FXApp

class FXApp

Application Object

Inheritance:


Public Fields

[more]static const FXuchar copyright[]
Copyright notice of library

Public Methods

[more] 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
[more]const FXString& getAppName() const
Get application name
[more]const FXString& getVendorName() const
Get vendor name
[more]FXbool openDisplay(const FXchar* dpyname=":0")
Connection to display; this is called by init()
[more]FXbool closeDisplay()
Close connection to the display
[more]void* getDisplay() const
Return pointer
[more]FXVisual* getDefaultVisual() const
Get default visual
[more]void setDefaultVisual(FXVisual* vis)
Change default visual
[more]FXVisual* getMonoVisual() const
Get monochrome visual
[more]FXRootWindow* getRoot() const
Get root Window
[more]FXWindow* getCursorWindow() const
Get the window under the cursor, if any
[more]FXWindow* getFocusWindow() const
Get the window which has the focus, if any
[more]FXWindow* getMainWindow() const
Get main window, if any
[more]FXWindow* findWindowWithId(FXID xid) const
Find window from id
[more]FXWindow* findWindowAt(FXint rx, FXint ry, FXID window=0) const
Find window from root x,y, starting from given window
[more]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
[more]FXTimer* removeTimeout(FXTimer* t)
Remove timeout, returns NULL
[more]FXChore* addChore(FXObject* tgt, FXSelector sel)
Add a idle processing message to be sent to target object when the system becomes idle, ie.
[more]FXChore* removeChore(FXChore* c)
Remove idle processing message
[more]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.
[more]void removeSignal(FXint sig)
Remove signal message for signal sig
[more]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).
[more]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)
[more]virtual void create()
Create application's windows
[more]virtual void destroy()
Destroy application's windows
[more]virtual void detach()
Detach application's windows
[more]FXbool peekEvent()
Peek to determine if there's an event
[more]void runOneEvent()
Perform one event dispatch
[more]FXint run()
Run the main application event loop until stop() is called, and return the exit code passed as argument to stop()
[more]FXint runUntil(FXuint& condition)
Run an event loop till some flag becomes non-zero
[more]FXint runWhileEvents(FXWindow* window=NULL)
Run event loop while there are events are available in the queue.
[more]FXint runModal()
Run modal event loop, blocking keyboard and mouse events to all windows until stopModal is called
[more]FXint runModalFor(FXWindow* window)
Run a modal event loop for the given window, until stop() or stopModal() is called.
[more]FXint runModalWhileShown(FXWindow* window)
Run modal while window is shown, or until stop() or stopModal() is called.
[more]FXint runPopup(FXWindow* window)
Run popup menu while shown, until stop() or stopModal() is called.
[more]FXbool isModal(FXWindow* window) const
True if the window is modal
[more]FXWindow* modalWindow() const
Return window of current modal loop
[more]FXModality modalModality() const
Return mode of current modal loop
[more]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
[more]void stopModal(FXWindow* window, FXint value=0)
Break out of the matching modal loop, returning code equal to value.
[more]void stopModal(FXint value=0)
Break out of the innermost modal loop, returning code equal to value
[more]void forceRefresh()
Force GUI refresh
[more]void refresh()
Schedule a refresh
[more]void flush(FXbool sync=FALSE)
Flush pending repaints
[more]void repaint()
Paint all windows marked for repainting.
[more]virtual void init(int& argc, char** argv, FXbool connect=TRUE)
Initialize application.
[more]virtual void exit(FXint code=0)
Exit application.
[more]FXRegistry& reg()
Get registry
[more]FXDragType registerDragType(const FXString& name) const
Register new DND type
[more]FXString getDragTypeName(FXDragType type) const
Get drag type name
[more]void beep()
Beep
[more]static inline FXApp* instance()
Return application instance
[more]void setNormalFont(FXFont* font)
Change default font
[more]FXFont* getNormalFont() const
Return default font
[more]void beginWaitCursor()
Begin of wait-cursor block; wait-cursor blocks may be nested
[more]void endWaitCursor()
End of wait-cursor block
[more]void setWaitCursor(FXCursor* cur)
Change to a new wait cursor
[more]FXCursor* getWaitCursor() const
Return current wait cursor
[more]FXCursor* getDefaultCursor(FXDefaultCursor which) const
Obtain a default cursor
[more]void setDefaultCursor(FXDefaultCursor which, FXCursor* cur)
Change default cursor
[more]FXuint getTypingSpeed() const
Obtain application-wide settings
[more]void setTypingSpeed(FXuint speed)
Change application-wide settings
[more]FXColor getBorderColor() const
Obtain default colors
[more]void setBorderColor(FXColor color)
Change default colors
[more]virtual void save(FXStream& store) const
Save
[more]virtual void load(FXStream& store)
Load
[more]void dumpWidgets() const
Dump widget information
[more]virtual ~FXApp()
Destroy the application and all reachable resources

Public Members

[more]enum Messages applications understand

Protected Methods

[more]virtual FXbool getNextEvent(FXRawEvent& ev, FXbool blocking=TRUE)
Return TRUE when new raw event is available
[more]virtual FXbool dispatchEvent(FXRawEvent& ev)
Dispatch raw event


Inherited from FXObject:

Public Methods

oconst FXchar* getClassName() const
oFXbool isMemberOf(const FXMetaClass* metaclass) const


Documentation

Application Object
ovirtual FXbool getNextEvent(FXRawEvent& ev, FXbool blocking=TRUE)
Return TRUE when new raw event is available

ovirtual FXbool dispatchEvent(FXRawEvent& ev)
Dispatch raw event

oenum Messages applications understand
Messages applications understand

o ID_QUIT
Terminate the application normally

o ID_DUMP
Dump the current widget tree

ostatic const FXuchar copyright[]
Information

o 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

oconst FXString& getAppName() const
Get application name

oconst FXString& getVendorName() const
Get vendor name

oFXbool openDisplay(const FXchar* dpyname=":0")
Connection to display; this is called by init()

oFXbool closeDisplay()
Close connection to the display

ovoid* getDisplay() const
Return pointer

oFXVisual* getDefaultVisual() const
Get default visual

ovoid setDefaultVisual(FXVisual* vis)
Change default visual

oFXVisual* getMonoVisual() const
Get monochrome visual

oFXRootWindow* getRoot() const
Get root Window

oFXWindow* getCursorWindow() const
Get the window under the cursor, if any

oFXWindow* getFocusWindow() const
Get the window which has the focus, if any

oFXWindow* getMainWindow() const
Get main window, if any

oFXWindow* findWindowWithId(FXID xid) const
Find window from id

oFXWindow* findWindowAt(FXint rx, FXint ry, FXID window=0) const
Find window from root x,y, starting from given window

oFXTimer* 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

oFXTimer* removeTimeout(FXTimer* t)
Remove timeout, returns NULL

oFXChore* 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.

oFXChore* removeChore(FXChore* c)
Remove idle processing message

ovoid 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.

ovoid removeSignal(FXint sig)
Remove signal message for signal sig

oFXbool 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.

oFXbool 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)

ovirtual void create()
Create application's windows

ovirtual void destroy()
Destroy application's windows

ovirtual void detach()
Detach application's windows

oFXbool peekEvent()
Peek to determine if there's an event

ovoid runOneEvent()
Perform one event dispatch

oFXint run()
Run the main application event loop until stop() is called, and return the exit code passed as argument to stop()

oFXint runUntil(FXuint& condition)
Run an event loop till some flag becomes non-zero

oFXint 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.

oFXint runModal()
Run modal event loop, blocking keyboard and mouse events to all windows until stopModal is called

oFXint 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.

oFXint 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.

oFXint runPopup(FXWindow* window)
Run popup menu while shown, until stop() or stopModal() is called. Also returns when entering previous cascading popup menu.

oFXbool isModal(FXWindow* window) const
True if the window is modal

oFXWindow* modalWindow() const
Return window of current modal loop

oFXModality modalModality() const
Return mode of current modal loop

ovoid 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

ovoid 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.

ovoid stopModal(FXint value=0)
Break out of the innermost modal loop, returning code equal to value

ovoid forceRefresh()
Force GUI refresh

ovoid refresh()
Schedule a refresh

ovoid flush(FXbool sync=FALSE)
Flush pending repaints

ovoid repaint()
Paint all windows marked for repainting. On return all the applications windows have been painted.

ovirtual 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.

ovirtual void exit(FXint code=0)
Exit application. Closes the display and writes the registry.

oFXRegistry& reg()
Get registry

oFXDragType registerDragType(const FXString& name) const
Register new DND type

oFXString getDragTypeName(FXDragType type) const
Get drag type name

ovoid beep()
Beep

ostatic inline FXApp* instance()
Return application instance

ovoid setNormalFont(FXFont* font)
Change default font

oFXFont* getNormalFont() const
Return default font

ovoid beginWaitCursor()
Begin of wait-cursor block; wait-cursor blocks may be nested

ovoid endWaitCursor()
End of wait-cursor block

ovoid setWaitCursor(FXCursor* cur)
Change to a new wait cursor

oFXCursor* getWaitCursor() const
Return current wait cursor

oFXCursor* getDefaultCursor(FXDefaultCursor which) const
Obtain a default cursor

ovoid setDefaultCursor(FXDefaultCursor which, FXCursor* cur)
Change default cursor

oFXuint getTypingSpeed() const
Obtain application-wide settings

ovoid setTypingSpeed(FXuint speed)
Change application-wide settings

oFXColor getBorderColor() const
Obtain default colors

ovoid setBorderColor(FXColor color)
Change default colors

ovirtual void save(FXStream& store) const
Save

ovirtual void load(FXStream& store)
Load

ovoid dumpWidgets() const
Dump widget information

ovirtual ~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++.