FontComboBox::FontComboBox( Control& parent ) : ComboBox( parent ), onFontSelected( 0 ), onFontSelectedReceiver( 0 ), onFontHighlighted( 0 ), onFontHighlightedReceiver( 0 ) { ResetFonts(); OnItemSelected( (ComboBox::item_event_handler)&FontComboBox::__ItemSelected, *this ); OnItemHighlighted( (ComboBox::item_event_handler)&FontComboBox::__ItemHighlighted, *this ); }
static void RefreshFonts() { WndProperty * wp; wp = (WndProperty*)wf->FindByName(_T("prpUseCustomFonts")); if (wp) { bool bUseCustomFonts = ((DataFieldBoolean*)(wp->GetDataField()))->GetAsBoolean(); ResetFonts(bUseCustomFonts); ShowFontEditButtons(bUseCustomFonts); } // now set SampleTexts on the Fonts frame WndFrame *sample; sample = (WndFrame *)wf->FindByName(_T("prpInfoWindowFont")); if (sample) sample->SetFont(TempInfoWindowFont); sample = (WndFrame *)wf->FindByName(_T("prpTitleWindowFont")); if (sample) sample->SetFont(TempTitleWindowFont); sample = (WndFrame *)wf->FindByName(_T("prpMapWindowFont")); if (sample) sample->SetFont(TempMapWindowFont); sample = (WndFrame *)wf->FindByName(_T("prpTitleSmallWindowFont")); if (sample) sample->SetFont(TempTitleSmallWindowFont); sample = (WndFrame *)wf->FindByName(_T("prpMapWindowBoldFont")); if (sample) sample->SetFont(TempMapWindowBoldFont); sample = (WndFrame *)wf->FindByName(_T("prpCDIWindowFont")); if (sample) sample->SetFont(TempCDIWindowFont); sample = (WndFrame *)wf->FindByName(_T("prpMapLabelFont")); if (sample) sample->SetFont(TempMapLabelFont); sample = (WndFrame *)wf->FindByName(_T("prpMapLabelImportantFont")); if (sample) sample->SetFont(TempMapLabelImportantFont); // now fix the rest of the dlgConfiguration fonts: wf->SetTitleFont(TempMapWindowBoldFont); }
void InitFonts() { RegisterCommand("fontlist", Fontlist_f); ResetFonts(); }