Public Member Functions

nitro::TopWindow Class Reference

Inherits nitro::ViewInterface.

Collaboration diagram for nitro::TopWindow:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TopWindow (void)
virtual bool ExecuteCommand (const char *Command, const void *Param1=NULL, const void *Param2=NULL)
virtual void * GetGUI (const char *ViewName=NULL, void *Parent=NULL)

Detailed Description

Самое верхнее окно, которое никогда не будет показано, но будет родителем всех остальных окон приложения.

Definition at line 566 of file mvc_core.cpp.


Constructor & Destructor Documentation

nitro::TopWindow::TopWindow ( void   ) 

Definition at line 619 of file mvc_core.cpp.

                                   : wxFrame( ( wxFrame * )NULL , -1 , "" , wxPoint( 0 , 0 ) , wxSize( 0 , 0 ) )
        {
                Centre();

                Show( FALSE );
        }


Member Function Documentation

bool nitro::TopWindow::ExecuteCommand ( const char *  Command,
const void *  Param1 = NULL,
const void *  Param2 = NULL 
) [virtual]

Using this function a command to the class can be sent.

Parameters:
Command - Command's name.
Param1 - First parameter.
Param2 - Second parameter.
Returns:
- false if the command was processed.
Exceptions:
nitro::exception - An exception of this type is thrown if the error occured.
Author:
Dodonov A.A.

Reimplemented from nitro::ExecuteCommandInterface.

Definition at line 626 of file mvc_core.cpp.

References nitro::exception::code(), and nitro::exception::what().

        {
                try
                {
                        if( std::string( "close_app" ) == Command )
                        {
                                this->Close( TRUE );

                                return( false );
                        }

                        return( true );
                }
                catch( nitro::exception e )
                {
                        throw( nitro::exception( std::string( "TopWindow::ExecuteCommand( const char * Command , const void * Param1 /* = NULL */ , const void * Param2 /* = NULL */ )::" ) + e.what() , e.code() ) );
                }
                catch( ... )
                {
                        throw( nitro::exception( "TopWindow::ExecuteCommand( const char * Command , const void * Param1 /* = NULL */ , const void * Param2 /* = NULL */ )::An error occured" , 1 ) );
                }

                return( FALSE );
        }

Here is the call graph for this function:

void * nitro::TopWindow::GetGUI ( const char *  ViewName = NULL,
void *  Parent = NULL 
) [virtual]

Function provides access to the GUI.

Parameters:
ViewName - View's name.
Parent - Parent for the view.
Returns:
View.
Exceptions:
nitro::exception - An exception of this type is thrown if the error occured.
Author:
Dodonov A.A.

Reimplemented from nitro::ViewInterface.

Definition at line 651 of file mvc_core.cpp.

References nitro::exception::code(), and nitro::exception::what().

        {
                try
                {
                        return( ( void * )( wxWindow * )this );
                }
                catch( nitro::exception e )
                {
                        throw( nitro::exception( std::string( "TopWindow::GetGUI( const char * ViewName /* = NULL */ , void * Parent /* = NULL */ )::" ) + e.what() , e.code() ) );
                }
                catch( ... )
                {
                        throw( nitro::exception( "TopWindow::GetGUI( const char * ViewName /* = NULL */ , void * Parent /* = NULL */ )::An error occured" , 1 ) );
                }
        }

Here is the call graph for this function:


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

Generated by  doxygen 1.6.1