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

FX::FXTopWindow Class Reference

#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::FXToolBarShell 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_MAXIMIZE = FXShell::ID_LAST,
  ID_MINIMIZE,
  ID_RESTORE,
  ID_CLOSE,
  ID_QUERY_DOCK,
  ID_LAST
}

Public Methods

virtual void create ()
 Create server-side resources.

virtual void detach ()
 Detach the server-side resources for this window.

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.

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 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 restore (FXbool notify=FALSE)
 Restore window to normal, return TRUE if restored.

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.

void setTitle (const FXString &name)
 Change window title.

const FXStringgetTitle () 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.


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 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; also, the lifetime of an owned window should not exceed that of the owner. The application will receive an ID_QUIT message when the last MainWindow is hidden, therefore normally terminating the application.

See also:


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
ID_MAXIMIZE  Maximize the window.
ID_MINIMIZE  Minimize the window.
ID_RESTORE  Restore the window.
ID_CLOSE  Close the window.
ID_QUERY_DOCK  Toolbar asks to dock.