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

Public Member Functions

virtual void create ()
virtual void detach ()
virtual void layout ()
virtual void setFocus ()
virtual void killFocus ()
virtual void show ()
virtual void hide ()
virtual void show (FXuint placement)
void place (FXuint placement)
virtual FXint getDefaultWidth ()
virtual FXint getDefaultHeight ()
FXbool getWMBorders (FXint &left, FXint &right, FXint &top, FXint &bottom)
virtual void raise ()
virtual void move (FXint x, FXint y)
virtual void resize (FXint w, FXint h)
virtual void position (FXint x, FXint y, FXint w, FXint h)
virtual FXbool maximize (FXbool notify=FALSE)
virtual FXbool minimize (FXbool notify=FALSE)
virtual FXbool restore (FXbool notify=FALSE)
virtual FXbool close (FXbool notify=FALSE)
FXbool isMaximized () const
FXbool isMinimized () const
void setTitle (const FXString &name)
FXString getTitle () const
void setPadTop (FXint pt)
FXint getPadTop () const
void setPadBottom (FXint pb)
FXint getPadBottom () const
void setPadLeft (FXint pl)
FXint getPadLeft () const
void setPadRight (FXint pr)
FXint getPadRight () const
FXint getHSpacing () const
FXint getVSpacing () const
void setHSpacing (FXint hs)
void setVSpacing (FXint vs)
void setPackingHints (FXuint ph)
FXuint getPackingHints () const
void setDecorations (FXuint decorations)
FXuint getDecorations () const
FXIcongetIcon () const
void setIcon (FXIcon *ic)
FXIcongetMiniIcon () const
void setMiniIcon (FXIcon *ic)
virtual void save (FXStream &store) const
virtual void load (FXStream &store)
virtual ~FXTopWindow ()

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. The lifetime of an owned window should not exceed that of the owner.

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.


Constructor & Destructor Documentation

virtual FX::FXTopWindow::~FXTopWindow  )  [virtual]
 

Destructor.


Member Function Documentation

virtual void FX::FXTopWindow::create  )  [virtual]
 

Create server-side resources.

Reimplemented from FX::FXShell.

Reimplemented in FX::FXMainWindow, FX::FXPrintDialog, FX::FXSplashWindow, and FX::FXToolBarShell.

virtual void FX::FXTopWindow::detach  )  [virtual]
 

Detach the server-side resources for this window.

Reimplemented from FX::FXComposite.

Reimplemented in FX::FXSplashWindow.

virtual void FX::FXTopWindow::layout  )  [virtual]
 

Perform layout.

Reimplemented from FX::FXComposite.

Reimplemented in FX::FXToolBarShell.

virtual void FX::FXTopWindow::setFocus  )  [virtual]
 

Move the focus to this window.

Reimplemented from FX::FXShell.

virtual void FX::FXTopWindow::killFocus  )  [virtual]
 

Remove the focus from this window.

Reimplemented from FX::FXShell.

virtual void FX::FXTopWindow::show  )  [virtual]
 

Show this window.

Reimplemented from FX::FXWindow.

Reimplemented in FX::FXSplashWindow.

virtual void FX::FXTopWindow::hide  )  [virtual]
 

Hide this window.

Reimplemented from FX::FXWindow.

Reimplemented in FX::FXDirDialog, FX::FXFileDialog, and FX::FXSplashWindow.

virtual void FX::FXTopWindow::show FXuint  placement  )  [virtual]
 

Show this window with given placement.

Reimplemented in FX::FXSplashWindow.

void FX::FXTopWindow::place FXuint  placement  ) 
 

Position the window based on placement.

virtual FXint FX::FXTopWindow::getDefaultWidth  )  [virtual]
 

Return the default width of this window.

Reimplemented from FX::FXComposite.

Reimplemented in FX::FXSplashWindow, and FX::FXToolBarShell.

virtual FXint FX::FXTopWindow::getDefaultHeight  )  [virtual]
 

Return the default height of this window.

Reimplemented from FX::FXComposite.

Reimplemented in FX::FXSplashWindow, and FX::FXToolBarShell.

FXbool FX::FXTopWindow::getWMBorders FXint &  left,
FXint &  right,
FXint &  top,
FXint &  bottom
 

Obtain border sizes added to our window by the window manager.

virtual void FX::FXTopWindow::raise  )  [virtual]
 

Raise this window to the top of the stacking order.

Reimplemented from FX::FXWindow.

virtual void FX::FXTopWindow::move FXint  x,
FXint  y
[virtual]
 

Move this window to the specified position in the parent's coordinates.

Reimplemented from FX::FXWindow.

virtual void FX::FXTopWindow::resize FXint  w,
FXint  h
[virtual]
 

Resize this window to the specified width and height.

Reimplemented from FX::FXWindow.

virtual void FX::FXTopWindow::position FXint  x,
FXint  y,
FXint  w,
FXint  h
[virtual]
 

Move and resize this window in the parent's coordinates.

Reimplemented from FX::FXWindow.

virtual FXbool FX::FXTopWindow::maximize FXbool  notify = FALSE  )  [virtual]
 

Maximize window, return TRUE if maximized.

virtual FXbool FX::FXTopWindow::minimize FXbool  notify = FALSE  )  [virtual]
 

Minimize or iconify window, return TRUE if minimized.

virtual FXbool FX::FXTopWindow::restore FXbool  notify = FALSE  )  [virtual]
 

Restore window to normal, return TRUE if restored.

virtual FXbool FX::FXTopWindow::close FXbool  notify = FALSE  )  [virtual]
 

Close the window, return TRUE if actually closed.

FXbool FX::FXTopWindow::isMaximized  )  const
 

Return TRUE if maximized.

FXbool FX::FXTopWindow::isMinimized  )  const
 

Return TRUE if minimized.

void FX::FXTopWindow::setTitle const FXString name  ) 
 

Change window title.

FXString FX::FXTopWindow::getTitle  )  const [inline]
 

Return window title.

void FX::FXTopWindow::setPadTop FXint  pt  ) 
 

Change top padding.

FXint FX::FXTopWindow::getPadTop  )  const [inline]
 

Get top interior padding.

void FX::FXTopWindow::setPadBottom FXint  pb  ) 
 

Change bottom padding.

FXint FX::FXTopWindow::getPadBottom  )  const [inline]
 

Get bottom interior padding.

void FX::FXTopWindow::setPadLeft FXint  pl  ) 
 

Change left padding.

FXint FX::FXTopWindow::getPadLeft  )  const [inline]
 

Get left interior padding.

void FX::FXTopWindow::setPadRight FXint  pr  ) 
 

Change right padding.

FXint FX::FXTopWindow::getPadRight  )  const [inline]
 

Get right interior padding.

FXint FX::FXTopWindow::getHSpacing  )  const [inline]
 

Return horizontal spacing between children.

FXint FX::FXTopWindow::getVSpacing  )  const [inline]
 

Return vertical spacing between children.

void FX::FXTopWindow::setHSpacing FXint  hs  ) 
 

Change horizontal spacing between children.

void FX::FXTopWindow::setVSpacing FXint  vs  ) 
 

Change vertical spacing between children.

void FX::FXTopWindow::setPackingHints FXuint  ph  ) 
 

Change packing hints for children.

FXuint FX::FXTopWindow::getPackingHints  )  const
 

Return packing hints for children.

void FX::FXTopWindow::setDecorations FXuint  decorations  ) 
 

Change title and border decorations.

FXuint FX::FXTopWindow::getDecorations  )  const
 

Return current title and border decorations.

FXIcon* FX::FXTopWindow::getIcon  )  const [inline]
 

Return window icon.

Reimplemented in FX::FXSplashWindow.

void FX::FXTopWindow::setIcon FXIcon ic  ) 
 

Change window icon.

Reimplemented in FX::FXSplashWindow.

FXIcon* FX::FXTopWindow::getMiniIcon  )  const [inline]
 

Return window mini (title) icon.

void FX::FXTopWindow::setMiniIcon FXIcon ic  ) 
 

Change window mini (title) icon.

virtual void FX::FXTopWindow::save FXStream store  )  const [virtual]
 

Save to stream.

Reimplemented from FX::FXWindow.

Reimplemented in FX::FXColorDialog, FX::FXDirDialog, FX::FXFileDialog, FX::FXFontDialog, FX::FXPrintDialog, FX::FXReplaceDialog, FX::FXSplashWindow, FX::FXToolBarShell, and FX::FXWizard.

virtual void FX::FXTopWindow::load FXStream store  )  [virtual]
 

Load from stream.

Reimplemented from FX::FXWindow.

Reimplemented in FX::FXColorDialog, FX::FXDirDialog, FX::FXFileDialog, FX::FXFontDialog, FX::FXPrintDialog, FX::FXReplaceDialog, FX::FXSplashWindow, FX::FXToolBarShell, and FX::FXWizard.

Copyright © 1997-2005 Jeroen van der Zijp