MGUI::APP_BASE Class Reference

Base class for application process instance. More...

#include <mgui/appmain.h>

List of all members.

Public Types

enum  LEGACYINIT {
  LEGACYINIT_Default = 0x00, LEGACYINIT_NoSetPosition = 0x01, LEGACYINIT_NoSetTitle = 0x02, LEGACYINIT_NoRealize = 0x04,
  LEGACYINIT_NoAutoSetExit = 0x08, LEGACYINIT_LockShellSize = 0x10, LEGACYINIT_NoDestroyTopOnExit = 0x20
}

Public Member Functions

const char * GetCmdParm (int idx) const
int GetCmdParmCount () const

Static Public Member Functions

static CFont * GetDefaultFont ()
static MDLGPARENT GetTopDlgParent ()

Protected Member Functions

 APP_BASE (UINT32 AllowedProduct1=0, UINT32 AllowedProduct2=0, UINT32 AllowedProduct3=0, UINT32 AllowedProduct4=0)
Widget MxInitLegacy (LEGACYINIT flags=LEGACYINIT_Default)
void SetLegacyAllowShellResize ()
virtual ~APP_BASE ()

Private Member Functions

virtual UINT32 v_DetermineProductCode () const
virtual void v_ExitInstance ()
virtual const char * v_GetProcessName () const=0
virtual bool v_InitInstance ()=0
virtual bool v_PreInitInstance ()


Detailed Description

Base class for application process instance.

A class derived from this must be constructed by a class derived from APP_MAIN, either in v_InitInstance or in its constructor. Failure to follow this convention will result in an exception during application startup or shutdown. Note that this is handled automatically for applications based on MGUI::APP_MULTI.

Definition at line 95 of file appmain.h.


Member Enumeration Documentation

enum MGUI::APP_BASE::LEGACYINIT

Enumerator:
LEGACYINIT_Default 
LEGACYINIT_NoSetPosition  Don't automatically set position.
LEGACYINIT_NoSetTitle  Don't automatically set title.
LEGACYINIT_NoRealize  Don't 'realize' toplevel application shell after InitInstance.
LEGACYINIT_NoAutoSetExit  Don't do MxSetExitProcess() when toplevel shell 'closed' via Window Manager.
LEGACYINIT_LockShellSize  Lock toplevel shell size after realizing.
LEGACYINIT_NoDestroyTopOnExit  Don't destroy TopLevel shell on exit as application destroys it.

Definition at line 99 of file appmain.h.


Constructor & Destructor Documentation

MGUI::APP_BASE::APP_BASE ( UINT32  AllowedProduct1 = 0,
UINT32  AllowedProduct2 = 0,
UINT32  AllowedProduct3 = 0,
UINT32  AllowedProduct4 = 0 
) [protected]

Constructor.

Parameters:
AllowedProduct1  Product code for license checking

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

Destructor.


Member Function Documentation

const char* MGUI::APP_BASE::GetCmdParm ( int  idx  )  const [inline]

Get command-line parameter for specified index.

Parameters:
idx  Command parameter index

int MGUI::APP_BASE::GetCmdParmCount (  )  const [inline]

Get number of command-line parameters.

static CFont* MGUI::APP_BASE::GetDefaultFont (  )  [static]

static MDLGPARENT MGUI::APP_BASE::GetTopDlgParent (  )  [static]

Get top level parent window for dialogs Intended for use by MGUI::SHELL, not usually called directly.

Widget MGUI::APP_BASE::MxInitLegacy ( LEGACYINIT  flags = LEGACYINIT_Default  )  [protected]

Perform legacy initialization for processes using TopLevel shell (X only).

Replaces MxInitProc(), should call from within v_InitInstance().

Returns:
Unrealized TopLevel shell.

void MGUI::APP_BASE::SetLegacyAllowShellResize (  )  [inline, protected]

Set to allow resize of legacy toplevel shell.

Must be done in derived class constructor. Required for some applications which need to dynamically grow the legacy toplevel shell.

Definition at line 154 of file appmain.h.

virtual UINT32 MGUI::APP_BASE::v_DetermineProductCode (  )  const [private, virtual]

Override to determine product code for license check.

Default implementation determines product code based on command line parameters and initialization settings. Not normally overridden.

virtual void MGUI::APP_BASE::v_ExitInstance (  )  [private, virtual]

Override to perform resource cleanup prior to application exit.

virtual const char* MGUI::APP_BASE::v_GetProcessName (  )  const [private, pure virtual]

Must be overridden to return 'process name' for use as 'INI group' and 'registry subkey'.

Should return character string having no whitespace.

virtual bool MGUI::APP_BASE::v_InitInstance (  )  [private, pure virtual]

Must be overridden to perform initialization of this application.

Initialization normally includes creation of primary user interface windows prior to entering main message handling loop.

Returns:
'true' if successful, 'false' if not (will exit if false).

virtual bool MGUI::APP_BASE::v_PreInitInstance (  )  [private, virtual]

Called at startup just prior to MsysAppInitialize.

Returns:
true to continue, false to terminate application.


The documentation for this class was generated from the following file:
Generated on Thu Apr 26 04:48:25 2007 for TNTsdk by  doxygen 1.5.2