Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXTopWindow Class Reference

Abstract base class for all top-level windows. More...

#include <FXTopWindow.h>

Inheritance diagram for FX::FXTopWindow:
FX::FXShell FX::FXComposite FX::FXWindow FX::FXDrawable FX::FXId FX::FXObject FX::FXDialogBox FX::FXMainWindow FX::FXSplashWindow FX::FXToolBarShell FX::FXChoiceBox FX::FXColorDialog FX::FXDirDialog FX::FXFileDialog FX::FXFontDialog FX::FXInputDialog FX::FXMessageBox FX::FXPrintDialog FX::FXProgressDialog FX::FXReplaceDialog FX::FXWizard

List of all members.

Public Types

enum  {
  ID_RESTORE = FXShell::ID_LAST, ID_MAXIMIZE, ID_MINIMIZE, ID_FULLSCREEN,
  ID_CLOSE, ID_QUERY_DOCK, ID_LAST
}

Public Member Functions

long onFocusUp (FXObject *, FXSelector, void *)
long onFocusDown (FXObject *, FXSelector, void *)
long onFocusLeft (FXObject *, FXSelector, void *)
long onFocusRight (FXObject *, FXSelector, void *)
long onSessionNotify (FXObject *, FXSelector, void *)
long onSessionClosed (FXObject *, FXSelector, void *)
long onRestore (FXObject *, FXSelector, void *)
long onMaximize (FXObject *, FXSelector, void *)
long onMinimize (FXObject *, FXSelector, void *)
long onCmdRestore (FXObject *, FXSelector, void *)
long onCmdMaximize (FXObject *, FXSelector, void *)
long onCmdMinimize (FXObject *, FXSelector, void *)
long onCmdFullScreen (FXObject *, FXSelector, void *)
long onCmdClose (FXObject *, FXSelector, void *)
long onCmdSetStringValue (FXObject *, FXSelector, void *)
long onCmdGetStringValue (FXObject *, FXSelector, void *)
long onCmdSetIconValue (FXObject *, FXSelector, void *)
long onCmdGetIconValue (FXObject *, FXSelector, void *)
virtual void create ()
 Create server-side resources.
virtual void detach ()
 Detach the server-side resources for this window.
virtual void destroy ()
 Destroy the server-side resources for this window.
virtual void layout ()
 Perform layout.
virtual void setFocus ()
 Move the focus to this window.
virtual void killFocus ()
 Remove the focus from this window.
virtual void show ()
 Show this window.
virtual void hide ()
 Hide this window.
virtual void show (FXuint placement)
 Show this window with given placement.
void place (FXuint placement)
 Position the window based on placement.
virtual FXint getDefaultWidth ()
 Return the default width of this window.
virtual FXint getDefaultHeight ()
 Return the default height of this window.
FXbool getWMBorders (FXint &left, FXint &right, FXint &top, FXint &bottom)
 Obtain border sizes added to our window by the window manager.
virtual void raise ()
 Raise this window to the top of the stacking order.
virtual void lower ()
 Lower this window to the bottom of the stacking order.
virtual void move (FXint x, FXint y)
 Move this window to the specified position in the parent's coordinates.
virtual void resize (FXint w, FXint h)
 Resize this window to the specified width and height.
virtual void position (FXint x, FXint y, FXint w, FXint h)
 Move and resize this window in the parent's coordinates.
virtual void flash (FXbool yes)
 Flash the window to get user's attention.
virtual FXbool restore (FXbool notify=false)
 Restore window to normal, return true if restored.
virtual FXbool maximize (FXbool notify=false)
 Maximize window, return true if maximized.
virtual FXbool minimize (FXbool notify=false)
 Minimize or iconify window, return true if minimized.
virtual FXbool fullScreen (FXbool notify=false)
 Make window full screen, return true if success.
virtual FXbool stackingOrder (FXuint order)
 Special stacking order level.
virtual FXbool close (FXbool notify=false)
 Close the window, return true if actually closed.
FXbool isMaximized () const
 Return true if maximized.
FXbool isMinimized () const
 Return true if minimized.
FXbool isFullScreen () const
 Return true if full screen.
void setTitle (const FXString &name)
 Change window title.
FXString getTitle () const
 Return window title.
void setPadTop (FXint pt)
 Change top padding.
FXint getPadTop () const
 Get top interior padding.
void setPadBottom (FXint pb)
 Change bottom padding.
FXint getPadBottom () const
 Get bottom interior padding.
void setPadLeft (FXint pl)
 Change left padding.
FXint getPadLeft () const
 Get left interior padding.
void setPadRight (FXint pr)
 Change right padding.
FXint getPadRight () const
 Get right interior padding.
FXint getHSpacing () const
 Return horizontal spacing between children.
FXint getVSpacing () const
 Return vertical spacing between children.
void setHSpacing (FXint hs)
 Change horizontal spacing between children.
void setVSpacing (FXint vs)
 Change vertical spacing between children.
void setPackingHints (FXuint ph)
 Change packing hints for children.
FXuint getPackingHints () const
 Return packing hints for children.
void setDecorations (FXuint decorations)
 Change title and border decorations.
FXuint getDecorations () const
 Return current title and border decorations.
FXIcongetIcon () const
 Return window icon.
void setIcon (FXIcon *ic)
 Change window icon.
FXIcongetMiniIcon () const
 Return window mini (title) icon.
void setMiniIcon (FXIcon *ic)
 Change window mini (title) icon.
virtual void save (FXStream &store) const
 Save to stream.
virtual void load (FXStream &store)
 Load from stream.
virtual ~FXTopWindow ()
 Destructor.

Protected Member Functions

void settitle ()
void seticons ()
void setdecorations ()
 FXTopWindow (FXApp *ap, const FXString &name, FXIcon *ic, FXIcon *mi, FXuint opts, FXint x, FXint y, FXint w, FXint h, FXint pl, FXint pr, FXint pt, FXint pb, FXint hs, FXint vs)
 FXTopWindow (FXWindow *ow, const FXString &name, FXIcon *ic, FXIcon *mi, FXuint opts, FXint x, FXint y, FXint w, FXint h, FXint pl, FXint pr, FXint pt, FXint pb, FXint hs, FXint vs)

Protected Attributes

FXString title
FXIconicon
FXIconminiIcon
FXint padtop
FXint padbottom
FXint padleft
FXint padright
FXint hspacing
FXint vspacing

Detailed Description

Abstract base class for all top-level windows.

TopWindows are usually managed by a Window Manager under X11 and therefore borders and window-menus and other decorations like resize- handles are subject to the Window Manager's interpretation of the decoration hints. When a TopWindow is closed, it sends a SEL_CLOSE message to its target. The target should return 0 in response to this message if there is no objection to proceed with the closing of the window, and return 1 otherwise. After the SEL_CLOSE message has been sent and no objection was raised, the window will delete itself. When the session is closed, the window will send a SEL_SESSION_NOTIFY message to its target, allowing the application to write any unsaved data to the disk. If the target returns 0, then the system will proceed to close the session. Subsequently a SEL_SESSION_CLOSED will be received which causes the window to be closed with prejudice by calling the function close(false). When receiving a SEL_UPDATE, the target can update the title string of the window, so that the title of the window reflects the name of the document, for example. For convenience, TopWindow provides the same layout behavior as the Packer widget, as well as docking and undocking of toolbars. TopWindows can be owned by other windows, or be free-floating. Owned TopWindows will usually remain stacked on top of the owner windows. The lifetime of an owned window should not exceed that of the owner.


Member Enumeration Documentation

anonymous enum
Enumerator:
ID_MAXIMIZE 

Restore the window.

ID_MINIMIZE 

Maximize the window.

ID_FULLSCREEN 

Minimize the window.

ID_CLOSE 

Make the window full screen.

ID_QUERY_DOCK 

Close the window.

ID_LAST 

Toolbar asks to dock.


Member Function Documentation

virtual FXbool FX::FXTopWindow::close ( FXbool  notify = false) [virtual]

Close the window, return true if actually closed.

If notify=true, the target will receive a SEL_CLOSE message to determine if it is OK to close the window. If the target ignores the SEL_CLOSE message or returns 0, the window will be closed, and subsequently deleted. When the last main window has been closed, the application will receive an ID_QUIT message and will be closed.


The documentation for this class was generated from the following file:

Copyright © 1997-2011 Jeroen van der Zijp