00001 #include "borqueror.h" 00002 00003 BqBase::BqBase( const int aId , Window *aParent ) 00004 : id( aId ) , isDisplayed( false ) , f( 0 ) 00005 { 00006 SetParent( aParent ); 00007 } 00008 00009 BqBase::~BqBase( void ) 00010 { 00011 Free( id ); 00012 } 00013 00014 const bool BqBase::SetupWindow( const Message &msg ) 00015 { 00016 Window::SetupWindow( msg ); 00017 00018 MessageServer::Instance().RegisterMessageClient( this , Message::CTRL_LCLICK ); 00019 00020 return true; 00021 } 00022 00023 void BqBase::SetupDialog( const std::string &aFormname ) 00024 { 00025 if( !f ) 00026 f = Load( aFormname , id ); 00027 00028 ArsSendMessage( Message( Message::SETUP_WINDOW , this ) ); 00029 00030 if( f ) 00031 { 00032 f->InitDialog( this ); 00033 InitDialog(); 00034 f->Draw(); 00035 isDisplayed = true; 00036 } 00037 SetTextAlign( S_ALIGN_TOP , S_ALIGN_LEFT ); 00038 } 00039 00040 const bool BqBase::MainLoop( void ) 00041 { 00042 while( isDisplayed ) 00043 f->DoDialog(); 00044 00045 f->ShutdownDialog( this ); 00046 00047 return true; 00048 } 00049