#include <starinfodlg.h>
Inheritance diagram for StarInfoDlg:


Public Member Functions | |
| StarInfoDlg (const int aid, StarSystem *&aSs, Window *aParent) | |
| ~StarInfoDlg (void) | |
| virtual const bool | MainLoop (void) |
| true if the screen must be refreshed | |
Protected Member Functions | |
| virtual const bool | SetupWindow (const Message &msg) |
| virtual const bool | evMouseLClick (const CtrlMessage &msg) |
Private Attributes | |
| StarSystem *& | ss |
| const int | id |
| bool | ans |
|
||||||||||||||||
|
Definition at line 16 of file starinfodlg.cpp. References eStarInfoDlg.
|
|
|
Definition at line 21 of file starinfodlg.cpp.
00022 {
00023 }
|
|
|
Definition at line 80 of file starinfodlg.cpp. References ans, and BqBase::isDisplayed.
00081 {
00082 BqBase::evMouseLClick( msg );
00083
00084 if( isDisplayed )
00085 if( ((Window *)msg.source)->GetId() == 1 )
00086 isDisplayed= false;
00087 else if( ((Window *)msg.source)->GetId() == 2 )
00088 {
00089 ans = isDisplayed= false;
00090 }
00091
00092 return true;
00093 }
|
|
|
true if the screen must be refreshed
Reimplemented from BqBase. Definition at line 69 of file starinfodlg.cpp. References ans, BqBase::MainLoop(), and BqBase::SetupDialog(). Referenced by StarSystemObject::evMouseLClick().
00070 {
00071 SetupDialog( "StarInfoDlg" );
00072
00073 ans = true;
00074
00075 BqBase::MainLoop();
00076
00077 return ans;
00078 }
|
|
|
Reimplemented from BqBase. Definition at line 25 of file starinfodlg.cpp. References BqBase::f, StarSystem::GetStarSize(), StarSystem::GetStarType(), id, StarInfo::IsId(), SunImageObject::SetSunIndex(), BqBase::SetupWindow(), Parameters::sizeStr, ss, StarSystem::ssName, Parameters::starInfo, StarSystem::starName, and StarSystem::starNameDescr.
00026 {
00027 BqBase::SetupWindow( aMsg );
00028
00029 if( f )
00030 {
00031 SunImageObject *img = dynamic_cast<SunImageObject *>( f->GetArsObject( 10 ) );
00032 img->SetImageId( id );
00033 img->SetSunIndex( ss->GetStarType() );
00034
00035 f->GetArsObject( 20 )->SetWndText( string( " " ) + ss->ssName );
00036 string str = ss->starName;
00037 if( !ss->starNameDescr.empty() )
00038 {
00039 str += " (";
00040 str += ss->starNameDescr + ")";
00041 }
00042 f->GetArsObject( 21 )->SetWndText( string( " " ) + str );
00043
00044 int thisId = ss->GetStarType() << 8 | ss->GetStarSize() - 1;
00045 vector<StarInfo *>::iterator pos = find_if( Parameters::starInfo.begin() , Parameters::starInfo.end() , bind2nd( mem_fun( &StarInfo::IsId ) , &thisId ) );
00046 if( pos != Parameters::starInfo.end() )
00047 {
00048 f->GetArsObject( 22 )->SetWndText( string( " " ) + (*pos)->classInf );
00049
00050 f->GetArsObject( 23 )->SetWndText( string( " " ) + Parameters::sizeStr[(*pos)->ssize] );
00051 f->GetArsObject( 24 )->SetWndText( string( " Approx. " ) + (*pos)->ageInf );
00052 char temp[128];
00053 sprintf( temp , " Approx. %d C" , (*pos)->temperature );
00054 f->GetArsObject( 25 )->SetWndText( temp );
00055 f->GetArsObject( 30 )->SetWndText( (*pos)->descrInf + "\n" );
00056 }
00057 else
00058 {
00059 f->GetArsObject( 22 )->SetWndText( "" );
00060 f->GetArsObject( 23 )->SetWndText( "" );
00061 f->GetArsObject( 24 )->SetWndText( "" );
00062 f->GetArsObject( 25 )->SetWndText( "" );
00063 f->GetArsObject( 30 )->SetWndText( "" );
00064 }
00065 }
00066 return true;
00067 }
|
|
|
Definition at line 32 of file starinfodlg.h. Referenced by evMouseLClick(), and MainLoop(). |
|
|
Reimplemented from BqBase. Definition at line 31 of file starinfodlg.h. Referenced by SetupWindow(). |
|
|
Definition at line 30 of file starinfodlg.h. Referenced by SetupWindow(). |
1.3.3