MGUI::APP_BASE Class Reference

Base class for application process instance. More...

#include <mgui/appmain.h>

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

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
bool GetCmdParmPath (int idx, FILEPATH &pathret) const
ICONID GetDefaultIconID () const

Static Public Member Functions

static MDLGPARENT GetTopDlgParent ()

Protected Member Functions

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

Private Member Functions

virtual UINT32 v_DetermineProductCode () const
virtual void v_ExitInstance ()
virtual ICONID v_GetDefaultIconID () const
virtual const char * v_GetProcessName () const =0
virtual void v_GetSessionLogPath (FILEPATH &path)
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.


Member Enumeration Documentation

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.


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 as string for specified index.

Parameters:
idx Command parameter index
int MGUI::APP_BASE::GetCmdParmCount (  )  const [inline]

Get number of command-line parameters.

bool MGUI::APP_BASE::GetCmdParmPath ( int  idx,
FILEPATH pathret 
) const

Get command-line parameter as FILEPATH.

Returns:
true if have parameter, false if not, does not check for path existence.
ICONID MGUI::APP_BASE::GetDefaultIconID (  )  const [inline]

Get the default ICONID for MGUI::SHELLs.

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

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

DEPRECATED 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.
Deprecated:
Use MGUI::TOPSHELL as base for main application window.
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.

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 ICONID MGUI::APP_BASE::v_GetDefaultIconID (  )  const [private, virtual]

Override to change the default ICONID for the icon in the upper-left corner of the title bar of all MGUI::SHELLs.

If not overridden, the default is to not set the icons, although this may change to become a TNTmips icon

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 void MGUI::APP_BASE::v_GetSessionLogPath ( FILEPATH path  )  [private, virtual]

Get specific path used for session log for this application. Returns false if none.

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).

Implemented in MGUI::APP_JOB.

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 Sun Oct 7 21:35:25 2012 for TNTsdk 2012 by  doxygen 1.6.1