First, Ypp includes few wrapper classes for datatypes from libyw. In most cases they aren't very smart, but are good for the very begining. Ypp::Object class is an exception, that it uses YtkObject's internal reference counter, that doesn't copy object when using assigments etc. Other classes copy content around.
All objects in Ypp are declared inside Ypp namespace. With one exception: extern "C" ypp_init() function, that needs to be called by code wishing to use Ypp* widgets.
Ypp::Class class is basic class that can be used to construct custom YtkObjects. There is just single function used for callback and finalization -- they are dispatched using C++ virtual functions. Unfortunetly, as C++ doesn't provide way of passing classes as function's arguments, there has to be single creation function for each implemented widget type. It's implemented using template, and simple shell script, that walks through sources and looks what classes needs to be registred.
Ypp::Class provide virtual member function to dispatch incoming packets (calls). It also translates few standard exception from this function and translates them to error messages. Note, that Ypp::Object::send_msg() function does the reverse.
Ypp::Widget provides support for object properties (ops), some widget's size functions, and few more things. It's abstract. For more detailed description, (including it's ops) for Ypp::Widget and other classes please refer to their manual pages.
This section describes used helper classes. They are mainly simple utilities and/or wrappers around various C libyw types.
Implements simple ASCII \0 terminated string. It is used mainly for it's buffer allocation facilities. Nothing intresting inside.
Wrapper around YwBuffer. Implements kinda abtract curses-like buffer. You can write characters at given position and with given attribute. Then you can flush the buffer -- it's accomplished using specfied callbacks.
Buffers has the main advantage, that there is predefined buffer associated with each window.
Possibly the clearest wrapper of all. It makes use of ytk functions for incressing and decressing reference count of objects. Member function to wrap ytk_object_* functions are provided. Pointer to wrapped YtkObject can be obtained with or without incressing reference count. Care must be taken when using this.
Wrapper around YwPacket, which is list of words plus a type of entire packet. Note, that passing Packet by value copies entire all words inside.
Single word of packet. Methods are provided for constructing it from types allowed for YwWord's and converting the other way around. Allowed types are: 32 signed integer, ASCII string, regular (UNICODE) string, void (empty word, usefull as tag argument) and pointer (void*, it's not allowed to send packet containing pointers through network).
When conversion fails exception is thrown.
Doesn't wrap any libyw type, just few functions. It implements parser for simple list in form (name value)*. In most cases order of value there isn't important, you can use find() function, that returns Word then. Otherwise next() and current() functions can be used to traverse the list.
In libyw taglist is reprsented simply by its first word, which has pointer to next element and so on.
Wrapped around YwString -- full featured UNICODE string. Encoding is hostendian array of 32 bit unsigned integers allowing UCS-4 encoding to be used.
Several exceptions. Some of them are translated to error messages in callback functions, and messages are translated to them in message sending functions. Set of such exceptions is however limited.