void COptionUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue) { if( _tcsicmp(pstrName, _T("group")) == 0 ) SetGroup(pstrValue); else if( _tcsicmp(pstrName, _T("selected")) == 0 ) Selected(_tcsicmp(pstrValue, _T("true")) == 0); else if( _tcsicmp(pstrName, _T("selectedimage")) == 0 ) SetSelectedImage(pstrValue); else if( _tcsicmp(pstrName, _T("selectedhotimage")) == 0 ) SetSelectedHotImage(pstrValue); else if( _tcsicmp(pstrName, _T("selectedpushedimage")) == 0 ) SetSelectedPushedImage(pstrValue); else if( _tcsicmp(pstrName, _T("selectedforeimage")) == 0 ) SetSelectedForedImage(pstrValue); else if( _tcsicmp(pstrName, _T("selectedstateimage")) == 0 ) SetSelectedStateImage(pstrValue); else if( _tcsicmp(pstrName, _T("selectedstatecount")) == 0 ) SetSelectedStateCount(_ttoi(pstrValue)); else if( _tcsicmp(pstrName, _T("selectedbkcolor")) == 0 ) { if( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue); LPTSTR pstr = NULL; DWORD clrColor = _tcstoul(pstrValue, &pstr, 16); SetSelectedBkColor(clrColor); } else if( _tcsicmp(pstrName, _T("selectedtextcolor")) == 0 ) { if( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue); LPTSTR pstr = NULL; DWORD clrColor = _tcstoul(pstrValue, &pstr, 16); SetSelectedTextColor(clrColor); } else if( _tcsicmp(pstrName, _T("selectedfont")) == 0 ) SetSelectedFont(_ttoi(pstrValue)); else CButtonUI::SetAttribute(pstrName, pstrValue); }
int wxAuiGtkTabArt::GetBestTabCtrlSize(wxWindow* wnd, const wxAuiNotebookPageArray& pages, const wxSize& required_bmp_size) { SetMeasuringFont(m_normalFont); SetSelectedFont(m_normalFont); int tab_height = 3 * gtk_widget_get_style(wxGTKPrivate::GetNotebookWidget())->ythickness + wxAuiGenericTabArt::GetBestTabCtrlSize(wnd, pages, required_bmp_size); return tab_height; }
void wxGenericFontButton::OnButtonClick(wxCommandEvent& WXUNUSED(ev)) { // update the wxFontData to be shown in the the dialog m_data.SetInitialFont(m_selectedFont); // create the font dialog and display it wxFontDialog dlg(this, m_data); if (dlg.ShowModal() == wxID_OK) { m_data = dlg.GetFontData(); SetSelectedFont(m_data.GetChosenFont()); // fire an event wxFontPickerEvent event(this, GetId(), m_selectedFont); GetEventHandler()->ProcessEvent(event); } }