![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
#include <FXApp.h>
Public Types | |
enum | { ID_QUIT =1, ID_DUMP, ID_HOVER, ID_LAST } |
Static Public Member Functions | |
static FXApp * | instance () |
Static Public Attributes | |
static const FXuchar | copyright [] |
Friends | |
class | FXId |
class | FXBitmap |
class | FXImage |
class | FXIcon |
class | FXCursor |
class | FXDrawable |
class | FXWindow |
class | FXShell |
class | FXRootWindow |
class | FXTopWindow |
class | FXMainWindow |
class | FXPopup |
class | FXFont |
class | FXVisual |
class | FXGLVisual |
class | FXGLContext |
class | FXDC |
class | FXDCWindow |
class | FXDragCorner |
class | FXDockHandler |
class | FXComposeContext |
Application Object.
See also:
anonymous enum |
Copyright notice of library.
Construct application object; the name and vendor strings are used as keys into the registry database for this application's settings. Only one single application object can be constructed.
|
virtual |
Destroy the application and all reachable resources.
|
inline |
Get application name.
|
inline |
Get vendor name.
Connection to display; this is called by init()
bool FX::FXApp::closeDisplay | ( | ) |
Close connection to the display.
|
inline |
Return pointer.
|
inline |
Is application initialized.
|
inline |
Get argument count.
|
inline |
Get argument vector.
bool FX::FXApp::hasInputMethod | ( | ) | const |
Return true if input method support.
|
inline |
Get default visual.
void FX::FXApp::setDefaultVisual | ( | FXVisual * | vis | ) |
Change default visual.
|
inline |
Get monochrome visual.
|
inline |
Get root Window.
References FX::FXPath::root().
void FX::FXApp::setRootWindow | ( | FXRootWindow * | rt | ) |
Set root Window.
FXWindow* FX::FXApp::getFocusWindow | ( | ) | const |
Return window at the end of the focus chain.
|
inline |
Get the window under the cursor, if any.
|
inline |
Get the active toplevel window, if any.
|
inline |
Get current popup window, if any.
Find window from root x,y, starting from given window.
|
virtual |
Create application's windows.
|
virtual |
Destroy application's windows.
|
virtual |
Detach application's windows.
void FX::FXApp::addTimeout | ( | FXObject * | tgt, |
FXSelector | sel, | ||
FXuint | ms = 1000 , |
||
void * | ptr = NULL |
||
) |
Add timeout message to be sent to target object in ms milliseconds; the timer fires only once after the interval expires.
The void* ptr is user data which will be passed into the void* ptr of the message handler. If a timer with the same target and message already exists, it will be rescheduled.
void FX::FXApp::removeTimeout | ( | FXObject * | tgt, |
FXSelector | sel | ||
) |
Remove timeout identified by tgt and sel.
bool FX::FXApp::hasTimeout | ( | FXObject * | tgt, |
FXSelector | sel | ||
) | const |
Return TRUE if given timeout has been set.
FXuint FX::FXApp::remainingTimeout | ( | FXObject * | tgt, |
FXSelector | sel | ||
) |
Return, in ms, the time remaining until the given timer fires.
If the timer is past due, 0 is returned. If there is no such timer, infinity (UINT_MAX) is returned.
void FX::FXApp::handleTimeouts | ( | ) |
Process any timeouts due at this time.
void FX::FXApp::addChore | ( | FXObject * | tgt, |
FXSelector | sel, | ||
void * | ptr = NULL |
||
) |
Add a idle processing message to be sent to target object when the system becomes idle, i.e.
there are no events to be processed. The void* ptr is user data which will be passed into the void* ptr of the message handler. If a chore with the same target and message already exists, it will be rescheduled.
void FX::FXApp::removeChore | ( | FXObject * | tgt, |
FXSelector | sel | ||
) |
Remove idle processing message identified by tgt and sel.
bool FX::FXApp::hasChore | ( | FXObject * | tgt, |
FXSelector | sel | ||
) | const |
Return TRUE if given chore has been set.
void FX::FXApp::addSignal | ( | FXint | sig, |
FXObject * | tgt, | ||
FXSelector | sel, | ||
FXbool | immediate = FALSE , |
||
FXuint | flags = 0 |
||
) |
Add signal processing message to be sent to target object when the signal sig is raised; flags are to be set as per POSIX definitions.
When immediate is TRUE, the message will be sent to the target right away; this should be used with extreme care as the application is interrupted at an unknown point in its execution.
void FX::FXApp::removeSignal | ( | FXint | sig | ) |
Remove signal message for signal sig.
bool FX::FXApp::addInput | ( | FXInputHandle | fd, |
FXuint | mode, | ||
FXObject * | tgt, | ||
FXSelector | sel | ||
) |
Add a file descriptor fd to be watched for activity as determined by mode, where mode is a bitwise OR (INPUT_READ, INPUT_WRITE, INPUT_EXCEPT).
A message of type SEL_IO_READ, SEL_IO_WRITE, or SEL_IO_EXCEPT will be sent to the target when the specified activity is detected on the file descriptor.
bool FX::FXApp::removeInput | ( | FXInputHandle | fd, |
FXuint | mode | ||
) |
Remove input message and target object for the specified file descriptor and mode, which is a bitwise OR of (INPUT_READ, INPUT_WRITE, INPUT_EXCEPT).
bool FX::FXApp::getKeyState | ( | FXuint | keysym | ) | const |
Return key state of given key.
bool FX::FXApp::peekEvent | ( | ) |
Peek to determine if there's an event.
bool FX::FXApp::runOneEvent | ( | bool | blocking = true | ) |
Perform one event dispatch; return true if event was dispatched.
FXint FX::FXApp::run | ( | ) |
Run an event loop till some flag becomes non-zero, and then return.
FXint FX::FXApp::runWhileEvents | ( | ) |
Run event loop while events are available, non-modally.
Return when no more events, timers, or chores are outstanding.
Run event loop while there are events are available in the queue.
Returns 1 when all events in the queue have been handled, and 0 when the event loop was terminated due to stop() or stopModal(). Except for the modal window and its children, user input to all windows is blocked; if the modal window is NULL, all user input is blocked.
FXint FX::FXApp::runModal | ( | ) |
Run modal event loop, blocking keyboard and mouse events to all windows until stopModal is called.
Run a modal event loop for the given window, until stop() or stopModal() is called.
Except for the modal window and its children, user input to all windows is blocked; if the modal window is NULL all user input is blocked.
Run modal while window is shown, or until stop() or stopModal() is called.
Except for the modal window and its children, user input to all windows is blocked; if the modal window is NULL all user input is blocked.
Run popup menu while shown, until stop() or stopModal() is called.
Also returns when entering previous cascading popup menu.
bool FX::FXApp::isModal | ( | FXWindow * | window | ) | const |
True if the window is modal.
FXWindow* FX::FXApp::getModalWindow | ( | ) | const |
Return window of current modal loop.
FXModality FX::FXApp::getModality | ( | ) | const |
Return mode of current modal loop.
void FX::FXApp::stop | ( | FXint | value = 0 | ) |
Terminate the outermost event loop, and all inner modal loops; All more deeper nested event loops will be terminated with code equal to 0, while the outermost event loop will return code equal to value.
Break out of the matching modal loop, returning code equal to value.
All deeper nested event loops are terminated with code equal to 0.
void FX::FXApp::stopModal | ( | FXint | value = 0 | ) |
Break out of the innermost modal loop, returning code equal to value.
void FX::FXApp::forceRefresh | ( | ) |
Force GUI refresh.
void FX::FXApp::refresh | ( | ) |
Schedule a refresh.
void FX::FXApp::flush | ( | bool | sync = false | ) |
Flush pending repaints.
void FX::FXApp::repaint | ( | ) |
Paint all windows marked for repainting.
On return all the applications windows have been painted.
|
virtual |
Initialize application.
Parses and removes common command line arguments, reads the registry. Finally, if connect is TRUE, it opens the display.
|
virtual |
Exit application.
Closes the display and writes the registry.
|
inline |
Return a reference to the registry.
The registry keeps settings and configuration information for an application, which are automatically loaded when the application starts up, and saved when the application terminates.
FXDragType FX::FXApp::registerDragType | ( | const FXString & | name | ) | const |
Register new DND type.
FXString FX::FXApp::getDragTypeName | ( | FXDragType | type | ) | const |
Get drag type name.
|
inline |
Return drag window if a drag operation is in progress.
void FX::FXApp::beep | ( | ) |
Beep.
|
inlinestatic |
Return application instance.
void FX::FXApp::setNormalFont | ( | FXFont * | font | ) |
Change default font.
|
inline |
Return default font.
void FX::FXApp::beginWaitCursor | ( | ) |
Begin of wait-cursor block; wait-cursor blocks may be nested.
void FX::FXApp::endWaitCursor | ( | ) |
End of wait-cursor block.
void FX::FXApp::setWaitCursor | ( | FXCursor * | cur | ) |
Change to a new wait cursor.
|
inline |
Return current wait cursor.
|
inline |
Obtain a default cursor.
void FX::FXApp::setDefaultCursor | ( | FXDefaultCursor | which, |
FXCursor * | cur | ||
) |
Change default cursor.
Write a window and its children, and all resources reachable from this window, into the stream store.
(EXPERIMENTAL!)
FXbool FX::FXApp::readWindow | ( | FXStream & | store, |
FXWindow *& | window, | ||
FXWindow * | father, | ||
FXWindow * | owner | ||
) |
Read a window and its children from the stream store, and append it under father; note it is initially not created yet.
(EXPERIMENTAL!)
|
inline |
Return a reference to the application-wide mutex.
Normally, the main user interface thread holds this mutex, insuring that no other threads are modifying data during the processing of user interface messages. However, whenever the main user interface thread blocks for messages, it releases this mutex, to allow other threads to modify the same data. When a new message becomes available, the main user interface thread regains the mutex prior to dispatching the message. Other threads should hold this mutex only for short durations, so as to not starve the main user interface thread.
void FX::FXApp::setTranslator | ( | FXTranslator * | trans | ) |
Change message translator.
The new translator will be owned by FXApp.
|
inline |
Return message translator.
|
inline |
Obtain application-wide settings.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void FX::FXApp::setTypingSpeed | ( | FXuint | speed | ) |
Change application-wide settings.
void FX::FXApp::setClickSpeed | ( | FXuint | speed | ) |
void FX::FXApp::setScrollSpeed | ( | FXuint | speed | ) |
void FX::FXApp::setScrollDelay | ( | FXuint | delay | ) |
void FX::FXApp::setBlinkSpeed | ( | FXuint | speed | ) |
void FX::FXApp::setAnimSpeed | ( | FXuint | speed | ) |
void FX::FXApp::setMenuPause | ( | FXuint | pause | ) |
void FX::FXApp::setTooltipPause | ( | FXuint | pause | ) |
void FX::FXApp::setTooltipTime | ( | FXuint | time | ) |
void FX::FXApp::setDragDelta | ( | FXint | delta | ) |
void FX::FXApp::setWheelLines | ( | FXint | lines | ) |
void FX::FXApp::setScrollBarSize | ( | FXint | size | ) |
|
inline |
Obtain default colors.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void FX::FXApp::setBorderColor | ( | FXColor | color | ) |
Change default colors.
void FX::FXApp::setBaseColor | ( | FXColor | color | ) |
void FX::FXApp::setHiliteColor | ( | FXColor | color | ) |
void FX::FXApp::setShadowColor | ( | FXColor | color | ) |
void FX::FXApp::setBackColor | ( | FXColor | color | ) |
void FX::FXApp::setForeColor | ( | FXColor | color | ) |
void FX::FXApp::setSelforeColor | ( | FXColor | color | ) |
void FX::FXApp::setSelbackColor | ( | FXColor | color | ) |
void FX::FXApp::setTipforeColor | ( | FXColor | color | ) |
void FX::FXApp::setTipbackColor | ( | FXColor | color | ) |
void FX::FXApp::setSelMenuTextColor | ( | FXColor | color | ) |
void FX::FXApp::setSelMenuBackColor | ( | FXColor | color | ) |
|
inline |
Get number of existing windows.
|
virtual |
Save.
Reimplemented from FX::FXObject.
|
virtual |
Load.
Reimplemented from FX::FXObject.
void FX::FXApp::dumpWidgets | ( | ) | const |
Dump widget information.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
static |
Information.
![]() |