|
ubit
|
configuration of the UAppli. More...
#include <uconf.hpp>
Public Member Functions | |
| void | useGL (bool=true) |
| specifies whether OpenGL is used for rendering graphics. More... | |
| void | useFreeType (bool=true) |
| specifies whether FreeType is used for rendering fonts. More... | |
| void | setDepthBuffer (int size) |
| specifies if a depth buffer should be used and the desired size. More... | |
| void | setStencilBuffer (int size) |
| specifies if a stencil buffer should be used and the desired size. More... | |
| void | setBpp (int bpp) |
| specifies the prefered number of Bits Per Pixels. More... | |
| void | setLocale (const UStr &s) |
| changes the locale [default = "" meaning: use default locale]. | |
| void | setScale (float v) |
| changes the scaling factor of the whole application [default = 1]. | |
| void | setVerbose (int v) |
| set verbose mode [default = false]. | |
| void | setDefaultBackground (const UBackground &) |
| changes the default background. | |
| void | setTransparentScrollbars (bool) |
| virtual void | printHelp () |
| prints Ubit help on cout. | |
| bool | isUsingGL () const |
| bool | isUsingFreeType () const |
| bool | isVerbose () const |
| int | getVerbosity () const |
| const UStr & | getLocale () const |
| current locale. | |
| float | getScale () const |
| global scale of the application. | |
| int | getMouseSelectButton () const |
| No of the standard button [default = left btn]. | |
| int | getMouseMenuButton () const |
| No of the button that opens contextual menus [default = right btn or Ctrl-btn on the Mac]. | |
| int | getMouseAltButton () const |
| No of the alternate button [default = middle btn or Alt-btn on the Mac]. More... | |
| virtual void | parseOptions (int &argc, char **argv, UOption *options) |
| retrieves options from the command line. More... | |
| virtual void | readAttributes (const char *pathname) |
| retrieves attributes from a configuration file. More... | |
| UAttrList * | getAttributes (const char *category) |
| see readAttributes(). | |
Public Attributes | |
| bool | xsync |
| bool | usync |
| enables synchronous graphics rendering for X11 and Ubit [default: false]. | |
| bool | menu_grab |
| enables mouse grabs when opening menus [default: true]. | |
| bool | postpone_delete |
| delete operations of objects that derive from UNode are postponed until the main loop returns [default: true]. | |
| bool | soft_dbf |
| enables soft double buffering when X11 is used for rendering graphics [default: true]. | |
| bool | soft_wins |
| bool | soft_menus |
| windows/menus are rendered as "soft windows" (i.e. simulated) [default: false]. | |
| bool | transp_scrollbars |
| scrollbars are transparent and superimposed [default: false]. | |
| bool | tele_pointers |
| telepointers are shown when the appli is displayed on several X servers. | |
| bool | generic_textsel |
| any object can select text [default: false]. | |
| int | click_radius |
| unsigned long | multi_click_delay |
| < UOn::mclick is not generated if the mouse if moved more than this distance. More... | |
| unsigned long | auto_repeat_delay |
| delay (in ms) before autoRepeat becomes active (see UElem::setAutoRepeat()). | |
| unsigned long | open_tip_delay |
| delay (in ms) before a UTip is opened. | |
| unsigned long | open_submenu_delay |
| delay (in ms) before a cascaded UMenu is opened. | |
Protected Attributes | |
| bool | freeze_options |
| const char *const | windowing_toolkit |
| bool | is_using_gl |
| bool | is_using_freetype |
| int | bpp |
| int | depth_size |
| int | stencil_size |
| int | verbosity |
| float | scale |
| int | filebox_width |
| int | filebox_height |
| int | filebox_line_count |
| const int & | mouse_select_button |
| const int & | mouse_menu_button |
| const int & | mouse_alt_button |
| UStr | locale |
| UStr | display |
| UFont * | default_font |
| UPix * | unknow_image |
| UFont * | selection_font |
| UColor * | selection_color |
| UColor * | selection_bgcolor |
| UBackground & | default_background |
configuration of the UAppli.
|
inline |
No of the alternate button [default = middle btn or Alt-btn on the Mac].
for pasting_text, DND and scroll_to_pointed_position in scrollbars.
|
virtual |
retrieves options from the command line.
this function parses the command line (ie. argc, argv) to retrieve options that are specified in the 'options' argument which is a NULL terminated table of UOption elements:
|
virtual |
retrieves attributes from a configuration file.
'pathname' specifies a file that has a CSS syntax which can start with a ~ (eg. ~/.uremote). For instance, if this file exists and contains:
local {
color: red;
sizes: 8,10,12;
}
remote {
color: blue;
sizes: 18,20,24;
}
these attributes can be retrieved as follows in the program:
UAttrList* alist = UAppli::conf.getAttributes("local");
if (alist) {
UStr* color = alist->getAttr("color");
UStr* sizes = alist->getAttr("sizes");
}
etc...
*
| void UConf::setBpp | ( | int | bpp | ) |
specifies the prefered number of Bits Per Pixels.
default is 24 bits, a value of 0 means "use default". In any case, the requested BPP is a hint: the closest available BPP will be used
| void UConf::setDepthBuffer | ( | int | size | ) |
specifies if a depth buffer should be used and the desired size.
typical values are 0 (no depth buffer) or 16. The size that is actually used is implementation dependent (e.g. GLUT uses a default value if 'size' > 0)
| void UConf::setStencilBuffer | ( | int | size | ) |
specifies if a stencil buffer should be used and the desired size.
The size that is actually used is implementation dependent.
| void UConf::useFreeType | ( | bool | state = true | ) |
specifies whether FreeType is used for rendering fonts.
the current implementation of FreeType requires OpenGL. This function should not be called after the creation of the UAppli.
| void UConf::useGL | ( | bool | state = true | ) |
specifies whether OpenGL is used for rendering graphics.
OpenGL rendering is used by default. This can be changed by calling this function BEFORE the UAppli is created or by launching the application with the -no-gl option
| unsigned long ubit::UConf::multi_click_delay |
< UOn::mclick is not generated if the mouse if moved more than this distance.
max delay (in ms) between 2 mouse clicks to generate a multiple click.
1.8.12