Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

TestApplication Class Reference

#include <ndk_demo.h>

Inheritance diagram for TestApplication:

NDK_XX::Application List of all members.

Public Methods

 TestApplication ()
int run ()

Protected Methods

int titlesize () const
void title ()
void activateMenuBar ()

Constructor & Destructor Documentation

TestApplication::TestApplication   [inline]
 

Definition at line 238 of file ndk_demo.h.

References NDK_XX::Application::app_title, and NDK_XX::Application::Application().

00238 : Application(TRUE) {app_title = "NDK++ Demo Application";};


Member Function Documentation

void TestApplication::activateMenuBar   [protected, virtual]
 

Implements NDK_XX::Application.

Definition at line 488 of file ndk_demo.cc.

Referenced by run().

00489 {
00490     MenuBar menu_bar(-1,"",1,80,0,0,'h');
00491 //  FramedMenuBar menuBar(1,80,0,0,items);
00492     menu_bar.is_main_menu=true;
00493     menu_bar.add_item( new APopUpCmd());
00494     menu_bar.add_item( new AnotherPopUpCmd());
00495     menu_bar.add_item( new NonImplementedItem("Third"));
00496     menu_bar.add_item( new ExitCmd());
00497     menu_bar.execute();
00498 }

int TestApplication::run  
 

Definition at line 465 of file ndk_demo.cc.

References activateMenuBar(), NDK_XX::Application::activateStatusBar(), and NDK_XX::Application::set_param_file_name().

00465                          {
00466 try{
00467     set_param_file_name("testapp.conf");
00468     activateStatusBar();
00469 
00470 #ifdef NCURSES_MOUSE_VERSION
00471     mousemask(ALL_MOUSE_EVENTS, (mmask_t *) 0);
00472 #endif
00473 
00474     activateMenuBar();
00475 }
00476 catch(NCursesException &e){
00477     cout    << e.classname() << ":" << e.errorno 
00478             << "(" << e.message << ")" << endl;
00479 }
00480 catch(...){
00481     cout << "Unknown error" << endl;
00482 }
00483     return 0;
00484 
00485 }

void TestApplication::title   [protected]
 

Definition at line 457 of file ndk_demo.cc.

References NDK_XX::Application::app_title.

00457                             {
00458   titleWindow->bkgd(screen_titles());
00459   titleWindow->addstr(0,(titleWindow->cols()-app_title.size())/2,app_title.c_str());
00460   titleWindow->refresh();
00461 }

int TestApplication::titlesize   const [inline, protected]
 

Definition at line 234 of file ndk_demo.h.

00234 { return 1; }


The documentation for this class was generated from the following files:
Generated on Thu Oct 10 16:02:10 2002 by doxygen1.2.17