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::NDKApplication List of all members.

Public Methods

 TestApplication ()
int run ()

Protected Methods

int titlesize () const
void title ()
void activateMenuBar (ListOfItems &items)

Constructor & Destructor Documentation

TestApplication::TestApplication   [inline]
 

Definition at line 135 of file ndk_demo.h.

References NDK_XX::NDKApplication::NDKApplication().

00135 : NDKApplication(TRUE) {  }


Member Function Documentation

void TestApplication::activateMenuBar ListOfItems &    items [protected, virtual]
 

Implements NDK_XX::NDKApplication.

Definition at line 267 of file ndk_demo.cc.

References NDK_XX::ListOfItems.

Referenced by run().

00268 {
00269     NDKMenuBar menuBar(1,80,0,0,items);
00270 //  NDKFramedMenuBar menuBar(1,80,0,0,items);
00271     menuBar();
00272 }

int TestApplication::run  
 

Definition at line 237 of file ndk_demo.cc.

References activateMenuBar(), NDK_XX::NDKApplication::activateStatusBar(), NDK_XX::ListOfItems, and NDK_XX::NDKApplication::set_param_file_name().

00237                          {
00238 try{
00239     set_param_file_name("testapp.conf");
00240     activateStatusBar();
00241 
00242     ListOfItems items;
00243     items.push_back( new APopUpCmd());
00244     items.push_back( new AnotherPopUpCmd());
00245     items.push_back( new NonImplementedItem("Third"));
00246     items.push_back( new ExitCmd());
00247     items.push_back( new ClosingMarkItem());
00248 
00249     activateMenuBar(items);
00250     ListOfItems::iterator it;
00251     for(it=items.begin();it!=items.end();it++){
00252         delete *it;
00253     }
00254 }
00255 catch(NCursesException &e){
00256     cout    << e.classname() << ":" << e.errorno 
00257             << "(" << e.message << ")" << endl;
00258 }
00259 catch(...){
00260     cout << "Unknown error" << endl;
00261 }
00262     return 0;
00263 
00264 }

void TestApplication::title   [protected]
 

Definition at line 226 of file ndk_demo.cc.

References title().

Referenced by title().

00226                             {
00227   const char * const title = " NDK++ Demo Application";
00228   const int len = ::strlen(title);
00229 
00230   titleWindow->bkgd(screen_titles());
00231   titleWindow->addstr(0,(titleWindow->cols()-len)/2,title);
00232   titleWindow->refresh();
00233 }

int TestApplication::titlesize   const [inline, protected]
 

Definition at line 131 of file ndk_demo.h.

00131 { return 1; }


The documentation for this class was generated from the following files:
Generated on Tue Aug 27 10:49:45 2002 by doxygen1.2.17