MGUI::SHELL Class Reference

Base class for 'shell' windows (application windows and dialogs). More...

#include <mgui/shell.h>

Inheritance diagram for MGUI::SHELL:
Inheritance graph
[legend]

List of all members.

Classes

class  PLACEMENT
 Container to encapsulate shell 'placement' for save/restore. More...

Public Member Functions

void AddDelegateOnClose (DELEGATE_VOID_NOPARMS delegate)
void AttachMenuBar (MENU &menubar, bool AddSeparator=false)
void Destroy ()
void DlgShowHelp () const
void ForceOnScreen (bool bResizeIfNecessary=false)
MDLGPARENT GetDlgParent () const
HELPID GetHelpID () const
LAYOUT_PANEGetMainPane ()
void GetPlacement (PLACEMENT &placement) const
LAYOUT_PANE_SHELLGetShellPane ()
MGUI::LAYOUT_PANEGetStatusBarPane ()
bool IsCreated () const
void NotifyActivate (bool activated)
void SetAllowTitleProcessID (bool allow)
void SetIcon (ICONID iconid)
bool SetPlacement (const PLACEMENT &placement, const char *PlacementKey=0)
void SetPlacementByKey (const char *PlacementKey)
void SetTitle (const MISTRING &title)
void Show ()

Static Public Member Functions

static const COLORGetDftBackgroundColor ()
static MDLGPARENT GetDftDlgParent ()
static void SetDftDlgParent (MDLGPARENT dlgparent)

Protected Member Functions

 SHELL (HELPID helpid)
virtual ~SHELL ()
void CallOnCloseDelegates ()
void CreateStatusBarPane (LAYOUT_ORIENTATION orientation=LAYOUT_ORIENTATION_Horizontal, LAYOUT_SIZEALIGN sizealign=LAYOUT_SIZEALIGN_FixedHeight)
ICONID GetIcon () const
const char * GetPlacementKey () const
void UpdateTitle ()

Private Member Functions

virtual int v_CreateContent ()=0
virtual void v_Destroy ()=0
virtual void v_OnActivate (bool activated)
virtual void v_OnCloseRequest ()=0

Detailed Description

Base class for 'shell' windows (application windows and dialogs).


Constructor & Destructor Documentation

MGUI::SHELL::SHELL ( HELPID  helpid  )  [protected]

Constructor.

virtual MGUI::SHELL::~SHELL (  )  [protected, virtual]

Destructor.


Member Function Documentation

void MGUI::SHELL::AddDelegateOnClose ( DELEGATE_VOID_NOPARMS  delegate  ) 

Add a delegate to be called when the shell is closed The delegate must be valid for the life of the dialog.

void MGUI::SHELL::AttachMenuBar ( MENU menubar,
bool  AddSeparator = false 
)

Attach menubar to shell.

Once a menu is attached to the shell the original MENU instance does not need to be retained unless access to menu items is required for enabling/disabling and determining state. Should only be called from within v_CreateContent.

Parameters:
menubar Menubar to attach, cannot be changed after attachment
AddSeparator Add horizontal separator line below menubar
void MGUI::SHELL::CallOnCloseDelegates (  )  [protected]

Call the delegates added with AddDelegateOnClose().

void MGUI::SHELL::CreateStatusBarPane ( LAYOUT_ORIENTATION  orientation = LAYOUT_ORIENTATION_Horizontal,
LAYOUT_SIZEALIGN  sizealign = LAYOUT_SIZEALIGN_FixedHeight 
) [protected]

Create pane at bottom of shell for statusbar.

Will be done automatically by GetStatusBarPane() with default parameters if necessary.

void MGUI::SHELL::Destroy (  ) 

Destroy the shell.

void MGUI::SHELL::DlgShowHelp (  )  const

Show help dialog with associated help ID.

void MGUI::SHELL::ForceOnScreen ( bool  bResizeIfNecessary = false  ) 

Force the shell on screen.

Does nothing if the shell is already 100% on screen. If the window is too big to fit and bResizeIfNecessary is true, the window will be resized so that it fits. For an MGUI::TOPSHELL derived class, this method should only be called after the shell has been opened (or in v_OnOpen()).

static const COLOR& MGUI::SHELL::GetDftBackgroundColor (  )  [static]

Get default background color for controls.

static MDLGPARENT MGUI::SHELL::GetDftDlgParent (  )  [static]

Get default parent for child dialogs.

Usually this will be the most-recently activated SHELL instance.

MDLGPARENT MGUI::SHELL::GetDlgParent (  )  const

Get MDLGPARENT for use as parent for child dialogs.

HELPID MGUI::SHELL::GetHelpID (  )  const [inline]

Get Help ID.

ICONID MGUI::SHELL::GetIcon (  )  const [inline, protected]

Get the ICONID of the window's title bar icon.

Will return ICONID__NONE if not set.

LAYOUT_PANE& MGUI::SHELL::GetMainPane (  )  [inline]

Get main layout pane.

void MGUI::SHELL::GetPlacement ( PLACEMENT placement  )  const

Get shell 'placement' on screen.

const char* MGUI::SHELL::GetPlacementKey (  )  const [inline, protected]

Get placement key.

LAYOUT_PANE_SHELL& MGUI::SHELL::GetShellPane (  )  [inline]

Get shell pane.

MGUI::LAYOUT_PANE& MGUI::SHELL::GetStatusBarPane (  ) 

Get pane for status bar.

Will create pane with default parameters if necessary.

bool MGUI::SHELL::IsCreated (  )  const [inline]

Determine if shell has been 'created' yet.

void MGUI::SHELL::NotifyActivate ( bool  activated  ) 

Send notification that shell has become active or inactive.

Intended for use by shell implementation only.

void MGUI::SHELL::SetAllowTitleProcessID ( bool  allow  )  [inline]

Set whether to allow process ID to appear in title.

Default is to allow, whether actually appears depends on user preference settings.

static void MGUI::SHELL::SetDftDlgParent ( MDLGPARENT  dlgparent  )  [inline, static]

Set default parent for child dialogs.

Should only be called after modal dialog closed to restore previous default.

void MGUI::SHELL::SetIcon ( ICONID  iconid  ) 

Set the window icon.

The iconid should refer to a 32x32 or larger icon. For it to show up on the Alt-Tab window, it apparently has to be 48x48.

bool MGUI::SHELL::SetPlacement ( const PLACEMENT placement,
const char *  PlacementKey = 0 
)

Set shell 'placement' on screen.

Return 'true' if successful, 'false' if not.

Parameters:
PlacementKey Key to associate with saving changes to position
void MGUI::SHELL::SetPlacementByKey ( const char *  PlacementKey  ) 

Set Ini/Registry key for automatic shell placement.

This will automatically load the placement and subsequently record any changes later made to the placement by the user.

void MGUI::SHELL::SetTitle ( const MISTRING title  ) 

Set title.

Parameters:
title Title string (can be TEXTID also)
void MGUI::SHELL::Show (  ) 

Bring the shell to the top of the display and make it the active shell.

void MGUI::SHELL::UpdateTitle (  )  [protected]
virtual int MGUI::SHELL::v_CreateContent (  )  [private, pure virtual]
virtual void MGUI::SHELL::v_Destroy (  )  [private, pure virtual]

Destroy the shell.

virtual void MGUI::SHELL::v_OnActivate ( bool  activated  )  [private, virtual]

Called when shell becomes active or inactive.

Default implementation does nothing.

Parameters:
activated True if activated, false if deactivated
virtual void MGUI::SHELL::v_OnCloseRequest (  )  [private, pure virtual]

Called when user requests that shell be 'closed'.

Usually results from an OS or Window Manager notification.

Implemented in MGUI::DLGSHELL, MGUI::TOPSHELL, MGUI::DLG_XML, and MIE::IMPEXPDIALOG_BASE.


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

Generated on Sun Oct 7 21:36:15 2012 for TNTsdk 2012 by  doxygen 1.6.1