void CDisplayText::HideText(bool bHide) { Ui::CWindow* pw; Ui::CGroup* pg; Ui::CLabel* pl; Ui::CButton* pb; int i; m_bHide = bHide; pw = static_cast<Ui::CWindow*>(m_interface->SearchControl(EVENT_WINDOW2)); if ( pw == 0 ) return; for ( i=0 ; i<MAXDTLINE ; i++ ) { pg = static_cast<Ui::CGroup*>(pw->SearchControl(EventType(EVENT_DT_GROUP0+i))); if ( pg != 0 ) { pg->SetState(STATE_VISIBLE, !bHide); } pl = static_cast<Ui::CLabel*>(pw->SearchControl(EventType(EVENT_DT_LABEL0+i))); if ( pl != 0 ) { pl->SetState(STATE_VISIBLE, !bHide); } pb = static_cast<CButton*>(pw->SearchControl(EventType(EVENT_DT_VISIT0+i))); if ( pb != 0 ) { pb->SetState(STATE_VISIBLE, !bHide); } } }
void CDisplayInfo::UpdateIndexButton() { Ui::CWindow* pw; Ui::CButton* button; Ui::CGroup* group; Ui::CEdit* edit; Math::Point pos, dim; char* filename; static int table[SATCOM_MAX] = { 0, // SATCOM_HUSTON 1, // SATCOM_SAT -1, // SATCOM_OBJECT 2, // SATCOM_LOADING 3, // SATCOM_PROG 4, // SATCOM_SOLUCE }; pw = static_cast<Ui::CWindow*>(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return; button = static_cast<Ui::CButton*>(pw->SearchControl(EVENT_SATCOM_HUSTON)); if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_HUSTON); filename = m_main->GetDisplayInfoName(SATCOM_HUSTON); button->SetState(STATE_VISIBLE, filename[0]!=0); } button = static_cast<Ui::CButton*>(pw->SearchControl(EVENT_SATCOM_SAT)); if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_SAT); filename = m_main->GetDisplayInfoName(SATCOM_SAT); button->SetState(STATE_VISIBLE, filename[0]!=0); } //? button = (CButton*)pw->SearchControl(EVENT_SATCOM_OBJECT); //? if ( button != 0 ) //? { //? button->SetState(STATE_CHECK, m_index==SATCOM_OBJECT); //? filename = m_main->GetDisplayInfoName(SATCOM_OBJECT); //? button->SetState(STATE_VISIBLE, filename[0]!=0); //? } button = static_cast<Ui::CButton*>(pw->SearchControl(EVENT_SATCOM_LOADING)); if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_LOADING); filename = m_main->GetDisplayInfoName(SATCOM_LOADING); button->SetState(STATE_VISIBLE, filename[0]!=0); } button = static_cast<Ui::CButton*>(pw->SearchControl(EVENT_SATCOM_PROG)); if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_PROG); filename = m_main->GetDisplayInfoName(SATCOM_PROG); button->SetState(STATE_VISIBLE, filename[0]!=0); } button = static_cast<Ui::CButton*>(pw->SearchControl(EVENT_SATCOM_SOLUCE)); if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_SOLUCE); filename = m_main->GetDisplayInfoName(SATCOM_SOLUCE); button->SetState(STATE_VISIBLE, filename[0]!=0 && m_bSoluce); } group = static_cast<Ui::CGroup*>(pw->SearchControl(EVENT_LABEL1)); if ( group != 0 ) { if ( m_index == -1 ) { group->ClearState(STATE_VISIBLE); } else { group->SetState(STATE_VISIBLE); pos.x = (50.0f+10.0f+48.0f-3.0f)/640.0f; pos.y = (30.0f+10.0f+24.0f+10.0f+324.0f-48.0f-1.0f)/480.0f; pos.y -= (48.0f+4.0f)/480.0f*table[m_index]; dim.x = 15.0f/640.0f; dim.y = 48.0f/480.0f; group->SetPos(pos); group->SetDim(dim); } } #if 0 button = (CButton*)pw->SearchControl(EVENT_HYPER_COPY); if ( button != 0 ) { button->SetState(STATE_VISIBLE, m_index==SATCOM_LOADING); } #endif edit = static_cast<Ui::CEdit*>(pw->SearchControl(EVENT_EDIT1)); if ( edit != 0 ) { //? edit->SetHiliteCap(m_index==SATCOM_LOADING); edit->SetHighlightCap(true); } UpdateCopyButton(); }