#include <uappli.hpp>
Inheritance diagram for UAppli:
Public Member Functions | |
UAppli (UConf &conf) | |
UAppli (int *argc, char **argv) | |
UAppli (int &argc, char **argv) | |
constructors for creating the Application Context | |
virtual | ~UAppli () |
destructor. | |
const class UConf & | getConf () const |
returns the configuration of this Display. | |
const char * | getCommandName () const |
const char * | getCommandPath () const |
returns the name or full path of the command that started the appli | |
UFrame * | getMainFrame () const |
returns the Main Frame | |
void | setTitle (const UStr &title) |
changes the title of the Main Frame | |
virtual int | mainLoop () |
virtual int | start () |
starts the event main loop of the application | |
virtual void | quitLoop (int status) |
virtual void | realize () |
realizes this application (allocates the X resources) | |
virtual bool | isRealized () const |
is the X data initialized?. | |
virtual void | add (class UWin *) |
virtual void | add (class UWin &) |
add a window (UFrame, UDialog) to the application | |
virtual void | remove (UWin &child, int remove_mode) |
virtual void | remove (UWin *child, int remove_mode) |
same as UGroup::remove(). | |
virtual void | updateAll () |
virtual void | updateAll (UUpdate upmode) |
updates all windows (see UWin::update()). | |
UGroup * | getOpenedMenu () |
returns the menu that is currently opened (null otherwise). | |
Static Public Member Functions | |
const class UConf & | getDefaults () |
configuration of the Appli context | |
UAppli * | getApp () |
returns the default UAppli context | |
void | quit (int status) |
quits the main loop of the application | |
UInput * | openInput (int input_source) |
this input source (file, socket) will call callback functions when it receives data | |
void | closeInput (class UInput *) |
closes this input source | |
UTimer * | openTimer (u_time delay, int ntimes=1) |
opens a new Timer that calls callback functions | |
void | closeTimer (class UTimer *) |
closes this Timer | |
UDisp * | openDisp (const UStr &display_name) |
opens a connection on a new X display | |
void | closeDisp (class UDisp *) |
[unstable]. | |
UDisp & | getDefaultDisp () |
UDisp * | getDisp (int disp_id) |
unsigned int | getDispCount () |
const UDispList & | getDisps () |
UMSclient * | openUMS (const UStr &ums_hostname, int ums_port=0) |
opens a connection with the UMS (Ubit Multiple Mouse/Message Server) | |
const char * | getVar (const char *name, bool get_from_shell=true) |
retreives a value from a variable name | |
const char * | getImaPath () |
gets the value of the UIMA_PATH variable (the DEFAULT location of images) | |
const char * | setVar (const char *name, const char *value) |
adds a variable/value pair to the Application variable database | |
const char * | setImaPath (const UStr &value) |
const char * | setImaPath (const char *value) |
sets the value of the UIMA_PATH variable (the DEFAULT location of images) | |
char * | makeImaPath (const char *filename) |
creates a full image file path name |
Notes:
|
constructors for creating the Application Context Arguments:
Options on the command line:
See also: classes UAppli and UDisp for important info. |
|
add a window (UFrame, UDialog) to the application notes:
Reimplemented from UDisp. |
|
closes this input source Note: the UInput is destroyed except if is still pointed by an 'uptr' |
|
closes this Timer Note: the UTimer is destroyed except if is still pointed by an 'uptr' |
|
returns the default UAppli context the "default" UAppli is *the* UAppli (as there is only one UAppli for a given program). Note: it's illegal to call this function before the UAppli has been created (this will throw an UError exception) |
|
returns the name or full path of the command that started the appli Note: name = path without the directory |
|
gets the value of the UIMA_PATH variable (the DEFAULT location of images) see: setImaPath() and getVar() |
|
returns the Main Frame the main frame is the first UFrame that was added to the UAppli (if any) |
|
retreives a value from a variable name searches variable in the Application variable database, then, if not found and 'get_from_shell' is true, in the Unix SHELL environment.
|
|
creates a full image file path name prefixes 'filename' with UIMA_PATH value if not starting by / . or $ and expands 'filename' if starting by $ |
|
opens a connection on a new X display 'display_name' name of the X Window server:
|
|
this input source (file, socket) will call callback functions when it receives data Example: uptr<UInput> in = appli.openInput(socket_desc); if (in) in->onAction( ucall(...) );Note: the UInput is automatically destroyed when the source (file, socket) is closed except if it is still pointed by an 'uptr'. |
|
opens a new Timer that calls callback functions Args:
|
|
opens a connection with the UMS (Ubit Multiple Mouse/Message Server) This makes it possible to control the mouse pointer(s) and to send events and messages to X applications on the remote display where the UMS is running. Args:
|
|
quits the main loop of the application Notes:
|
|
realizes this application (allocates the X resources) this function does not need to be explicitely called except if you need to draw Graphics before calling the mainLoop Exception:
Reimplemented from UDisp. |
|
sets the value of the UIMA_PATH variable (the DEFAULT location of images)
the value of the UIMA_PATH variable is prefixed to image file names that do not start with / or . or $
|
|
changes the title of the Main Frame see also: UTitle |
|
adds a variable/value pair to the Application variable database Notes:
|
|
starts the event main loop of the application returns the status argument given as an arg of the quit() method |