Application Object
Inheritance:
Public Fields
-
static const FXuchar copyright[]
- Copyright notice of library
Public Methods
-
FXApp(const FXString& name="Application", const FXString& vendor="FoxDefault")
- Construct application object; the name and vendor strings are used as keys into the registry database for this application's settings
-
const FXString& getAppName() const
- Get application name
-
const FXString& getVendorName() const
- Get vendor name
-
FXbool openDisplay(const FXchar* dpyname=":0")
- Connection to display; this is called by init()
-
FXbool closeDisplay()
- Close connection to the display
-
void* getDisplay() const
- Return pointer
-
FXVisual* getDefaultVisual() const
- Get default visual
-
void setDefaultVisual(FXVisual* vis)
- Change default visual
-
FXVisual* getMonoVisual() const
- Get monochrome visual
-
FXRootWindow* getRoot() const
- Get root Window
-
FXWindow* getCursorWindow() const
- Get the window under the cursor, if any
-
FXWindow* getFocusWindow() const
- Get the window which has the focus, if any
-
FXWindow* getMainWindow() const
- Get main window, if any
-
FXWindow* findWindowWithId(FXID xid) const
- Find window from id
-
FXWindow* findWindowAt(FXint rx, FXint ry, FXID window=0) const
- Find window from root x,y, starting from given window
-
FXTimer* addTimeout(FXint ms, FXObject* tgt, FXSelector sel)
- Add timeout message to be sent to target object in ms milliseconds; the timer fires only once after the interval expires
-
FXTimer* removeTimeout(FXTimer* t)
- Remove timeout, returns NULL
-
FXChore* addChore(FXObject* tgt, FXSelector sel)
- Add a idle processing message to be sent to target object when the system becomes idle, ie.
-
FXChore* removeChore(FXChore* c)
- Remove idle processing message
-
void 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.
-
void removeSignal(FXint sig)
- Remove signal message for signal sig
-
FXbool 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).
-
FXbool 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)
-
virtual void create()
- Create application's windows
-
virtual void destroy()
- Destroy application's windows
-
virtual void detach()
- Detach application's windows
-
FXbool peekEvent()
- Peek to determine if there's an event
-
void runOneEvent()
- Perform one event dispatch
-
FXint run()
- Run the main application event loop until stop() is called, and return the exit code passed as argument to stop()
-
FXint runUntil(FXuint& condition)
- Run an event loop till some flag becomes non-zero
-
FXint runWhileEvents(FXWindow* window=NULL)
- Run event loop while there are events are available in the queue.
-
FXint runModal()
- Run modal event loop, blocking keyboard and mouse events to all windows until stopModal is called
-
FXint runModalFor(FXWindow* window)
- Run a modal event loop for the given window, until stop() or stopModal() is called.
-
FXint runModalWhileShown(FXWindow* window)
- Run modal while window is shown, or until stop() or stopModal() is called.
-
FXint runPopup(FXWindow* window)
- Run popup menu while shown, until stop() or stopModal() is called.
-
FXbool isModal(FXWindow* window) const
- True if the window is modal
-
FXWindow* modalWindow() const
- Return window of current modal loop
-
FXModality modalModality() const
- Return mode of current modal loop
-
void 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
-
void stopModal(FXWindow* window, FXint value=0)
- Break out of the matching modal loop, returning code equal to value.
-
void stopModal(FXint value=0)
- Break out of the innermost modal loop, returning code equal to value
-
void forceRefresh()
- Force GUI refresh
-
void refresh()
- Schedule a refresh
-
void flush(FXbool sync=FALSE)
- Flush pending repaints
-
void repaint()
- Paint all windows marked for repainting.
-
virtual void init(int& argc, char** argv, FXbool connect=TRUE)
- Initialize application.
-
virtual void exit(FXint code=0)
- Exit application.
-
FXRegistry& reg()
- Get registry
-
FXDragType registerDragType(const FXString& name) const
- Register new DND type
-
FXString getDragTypeName(FXDragType type) const
- Get drag type name
-
void beep()
- Beep
-
static inline FXApp* instance()
- Return application instance
-
void setNormalFont(FXFont* font)
- Change default font
-
FXFont* getNormalFont() const
- Return default font
-
void beginWaitCursor()
- Begin of wait-cursor block; wait-cursor blocks may be nested
-
void endWaitCursor()
- End of wait-cursor block
-
void setWaitCursor(FXCursor* cur)
- Change to a new wait cursor
-
FXCursor* getWaitCursor() const
- Return current wait cursor
-
FXCursor* getDefaultCursor(FXDefaultCursor which) const
- Obtain a default cursor
-
void setDefaultCursor(FXDefaultCursor which, FXCursor* cur)
- Change default cursor
-
FXuint getTypingSpeed() const
- Obtain application-wide settings
-
void setTypingSpeed(FXuint speed)
- Change application-wide settings
-
FXColor getBorderColor() const
- Obtain default colors
-
void setBorderColor(FXColor color)
- Change default colors
-
virtual void save(FXStream& store) const
- Save
-
virtual void load(FXStream& store)
- Load
-
void dumpWidgets() const
- Dump widget information
-
virtual ~FXApp()
- Destroy the application and all reachable resources
Public Members
-
enum Messages applications understand
Protected Methods
-
virtual FXbool getNextEvent(FXRawEvent& ev, FXbool blocking=TRUE)
- Return TRUE when new raw event is available
-
virtual FXbool dispatchEvent(FXRawEvent& ev)
- Dispatch raw event
Public Methods
-
const FXchar* getClassName() const
-
FXbool isMemberOf(const FXMetaClass* metaclass) const
Documentation
Application Object
- virtual FXbool getNextEvent(FXRawEvent& ev, FXbool blocking=TRUE)
- Return TRUE when new raw event is available
- virtual FXbool dispatchEvent(FXRawEvent& ev)
- Dispatch raw event
- enum Messages applications understand
- Messages applications understand
- ID_QUIT
- Terminate the application normally
- ID_DUMP
- Dump the current widget tree
- static const FXuchar copyright[]
- Information
- FXApp(const FXString& name="Application", const FXString& vendor="FoxDefault")
-
Construct application object; the name and vendor strings are used
as keys into the registry database for this application's settings
- const FXString& getAppName() const
- Get application name
- const FXString& getVendorName() const
- Get vendor name
- FXbool openDisplay(const FXchar* dpyname=":0")
- Connection to display; this is called by init()
- FXbool closeDisplay()
- Close connection to the display
- void* getDisplay() const
- Return pointer
- FXVisual* getDefaultVisual() const
- Get default visual
- void setDefaultVisual(FXVisual* vis)
- Change default visual
- FXVisual* getMonoVisual() const
- Get monochrome visual
- FXRootWindow* getRoot() const
- Get root Window
- FXWindow* getCursorWindow() const
- Get the window under the cursor, if any
- FXWindow* getFocusWindow() const
- Get the window which has the focus, if any
- FXWindow* getMainWindow() const
- Get main window, if any
- FXWindow* findWindowWithId(FXID xid) const
- Find window from id
- FXWindow* findWindowAt(FXint rx, FXint ry, FXID window=0) const
- Find window from root x,y, starting from given window
- FXTimer* addTimeout(FXint ms, FXObject* tgt, FXSelector sel)
-
Add timeout message to be sent to target object in ms milliseconds;
the timer fires only once after the interval expires
- FXTimer* removeTimeout(FXTimer* t)
- Remove timeout, returns NULL
- FXChore* addChore(FXObject* tgt, FXSelector sel)
-
Add a idle processing message to be sent to target object when
the system becomes idle, ie. there are no events to be processed.
- FXChore* removeChore(FXChore* c)
- Remove idle processing message
- void 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 it its execution.
- void removeSignal(FXint sig)
- Remove signal message for signal sig
- FXbool 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.
- FXbool 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)
- virtual void create()
- Create application's windows
- virtual void destroy()
- Destroy application's windows
- virtual void detach()
- Detach application's windows
- FXbool peekEvent()
- Peek to determine if there's an event
- void runOneEvent()
- Perform one event dispatch
- FXint run()
-
Run the main application event loop until stop() is called,
and return the exit code passed as argument to stop()
- FXint runUntil(FXuint& condition)
- Run an event loop till some flag becomes non-zero
- FXint runWhileEvents(FXWindow* window=NULL)
-
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 runModal()
-
Run modal event loop, blocking keyboard and mouse events to all windows
until stopModal is called
- FXint runModalFor(FXWindow* window)
-
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.
- FXint runModalWhileShown(FXWindow* window)
-
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.
- FXint runPopup(FXWindow* window)
-
Run popup menu while shown, until stop() or stopModal() is called.
Also returns when entering previous cascading popup menu.
- FXbool isModal(FXWindow* window) const
- True if the window is modal
- FXWindow* modalWindow() const
- Return window of current modal loop
- FXModality modalModality() const
- Return mode of current modal loop
- void 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
- void stopModal(FXWindow* window, FXint value=0)
-
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 stopModal(FXint value=0)
-
Break out of the innermost modal loop, returning code equal to value
- void forceRefresh()
- Force GUI refresh
- void refresh()
- Schedule a refresh
- void flush(FXbool sync=FALSE)
- Flush pending repaints
- void repaint()
-
Paint all windows marked for repainting.
On return all the applications windows have been painted.
- virtual void init(int& argc, char** argv, FXbool connect=TRUE)
-
Initialize application.
Parses and removes common command line arguments, reads the registry.
Finally, if connect is TRUE, it opens the display.
- virtual void exit(FXint code=0)
-
Exit application.
Closes the display and writes the registry.
- FXRegistry& reg()
- Get registry
- FXDragType registerDragType(const FXString& name) const
- Register new DND type
- FXString getDragTypeName(FXDragType type) const
- Get drag type name
- void beep()
- Beep
- static inline FXApp* instance()
- Return application instance
- void setNormalFont(FXFont* font)
- Change default font
- FXFont* getNormalFont() const
- Return default font
- void beginWaitCursor()
- Begin of wait-cursor block; wait-cursor blocks may be nested
- void endWaitCursor()
- End of wait-cursor block
- void setWaitCursor(FXCursor* cur)
- Change to a new wait cursor
- FXCursor* getWaitCursor() const
- Return current wait cursor
- FXCursor* getDefaultCursor(FXDefaultCursor which) const
- Obtain a default cursor
- void setDefaultCursor(FXDefaultCursor which, FXCursor* cur)
- Change default cursor
- FXuint getTypingSpeed() const
- Obtain application-wide settings
- void setTypingSpeed(FXuint speed)
- Change application-wide settings
- FXColor getBorderColor() const
- Obtain default colors
- void setBorderColor(FXColor color)
- Change default colors
- virtual void save(FXStream& store) const
- Save
- virtual void load(FXStream& store)
- Load
- void dumpWidgets() const
- Dump widget information
- virtual ~FXApp()
- Destroy the application and all reachable resources
- This class has no child classes.
- Friends:
- class FXBitmap
class FXImage
class FXIcon
class FXCursor
class FXDrawable
class FXWindow
class FXShell
class FXRootWindow
class FXTopWindow
class FXMainWindow
class FXFont
class FXVisual
class FXGLVisual
class FXGLContext
class FXDC
class FXDCWindow
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.