|The RG_Tileview widget displays the contents of a RG_Tile(3) and provides an interface for implementing different types of graphical editors and tools. Built-in graphical editors for tile pixmaps, sketches and features are provided.|
The RG_TileviewNew() function allocates, initializes, and attaches a RG_Tileview widget, initially displaying the given tile. Acceptable flags include:
The RG_TileviewSetTile() function changes the tile associated with the given RG_Tileview.
The RG_TileviewSetZoom() function changes the display scaling factor to new_zoom (given in percents). If the adj_offset argument is non-zero, the display is offset to preserve centering.
The RG_TileviewSetAutoRefresh() function controls the auto-refresh setting. If flag is non-zero, the tile is automatically regenerated every rate milliseconds.
The RG_Tileview widget implements generic graphical controls. It is used for moving and resizing pixmaps/sketches inside tiles and controlling particular features. A control may manipulate multiple integral and floating-point variables.
The RG_TileviewAddCtrl() function creates a new graphical control of the given type:
RG_TILEVIEW_POINT controls a single point value. It is used for setting the position of the origin of a tile, for instance. RG_TILEVIEW_RECTANGLE controls both the coordinates and geometry of a rectangle. It is used for things like pixmaps and sketches. RG_TILEVIEW_RDIMENSIONS controls the dimensions of a non-movable rectangle. It is used for changing the geometry of the tile itself when no sketches, pixmaps or features are selected. RG_TILEVIEW_CIRCLE controls the position and radius of a circle.
The special format string fmt and subsequent arguments specify the variables to edit. Acceptable sequences include %i (int), %u (Uint), %f (float) and %d (double). Sequences such as %*i specify that the argument is a pointer to the given type.
The RG_TileviewDelCtrl() function destroys the given control.
The remaining tileview_*() and tileview_set_*() functions respectively retrieve and modify the given value associated with the given control.
The RG_TileviewSelectTool() and RG_TileviewUnselectTool() functions select or deselect the current edition tool.
The generic features of all edition tools are defined by the structure:
Two specialized derivates are available, one for bitmap-specific tools and another for vector-specific tools:
|The RG_Tileview widget does not generate any event.|
|RG(3), RG_Anim(3), RG_Feature(3), RG_Pixmap(3), RG_Sketch(3), RG_Texture(3), RG_Tile(3)|