static void style_selected (Widget w, int i, XmToggleButtonCallbackStruct * cbs) { RouteStyleType *style; int j, n; if (cbs && cbs->set == 0) { XmToggleButtonSetState (w, 1, 0); return; } style = PCB->RouteStyle + i; SetLineSize (style->Thick); SetViaSize (style->Diameter, true); SetViaDrillingHole (style->Hole, true); SetKeepawayWidth (style->Keepaway); if (style_dialog) { for (j = 0; j < NUM_STYLES; j++) if (j != i) XmToggleButtonSetState (style_pb[j], 0, 0); else XmToggleButtonSetState (style_pb[j], 1, 0); update_values (); } else lesstif_update_status_line (); for (n = 0; n < num_style_buttons; n++) { for (j = 0; j < NUM_STYLES; j++) if (j != i) XmToggleButtonSetState (style_button_list[n].w[j], 0, 0); else XmToggleButtonSetState (style_button_list[n].w[j], 1, 0); } }
void CScrollBarUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue) { if( _tcsicmp(pstrName, _T("button1normalimage")) == 0 ) SetButton1NormalImage(pstrValue); else if( _tcsicmp(pstrName, _T("button1hotimage")) == 0 ) SetButton1HotImage(pstrValue); else if( _tcsicmp(pstrName, _T("button1pushedimage")) == 0 ) SetButton1PushedImage(pstrValue); else if( _tcsicmp(pstrName, _T("button1disabledimage")) == 0 ) SetButton1DisabledImage(pstrValue); else if( _tcsicmp(pstrName, _T("button2normalimage")) == 0 ) SetButton2NormalImage(pstrValue); else if( _tcsicmp(pstrName, _T("button2hotimage")) == 0 ) SetButton2HotImage(pstrValue); else if( _tcsicmp(pstrName, _T("button2pushedimage")) == 0 ) SetButton2PushedImage(pstrValue); else if( _tcsicmp(pstrName, _T("button2disabledimage")) == 0 ) SetButton2DisabledImage(pstrValue); else if( _tcsicmp(pstrName, _T("thumbnormalimage")) == 0 ) SetThumbNormalImage(pstrValue); else if( _tcsicmp(pstrName, _T("thumbhotimage")) == 0 ) SetThumbHotImage(pstrValue); else if( _tcsicmp(pstrName, _T("thumbpushedimage")) == 0 ) SetThumbPushedImage(pstrValue); else if( _tcsicmp(pstrName, _T("thumbdisabledimage")) == 0 ) SetThumbDisabledImage(pstrValue); else if( _tcsicmp(pstrName, _T("railnormalimage")) == 0 ) SetRailNormalImage(pstrValue); else if( _tcsicmp(pstrName, _T("railhotimage")) == 0 ) SetRailHotImage(pstrValue); else if( _tcsicmp(pstrName, _T("railpushedimage")) == 0 ) SetRailPushedImage(pstrValue); else if( _tcsicmp(pstrName, _T("raildisabledimage")) == 0 ) SetRailDisabledImage(pstrValue); else if( _tcsicmp(pstrName, _T("bknormalimage")) == 0 ) SetBkNormalImage(pstrValue); else if( _tcsicmp(pstrName, _T("bkhotimage")) == 0 ) SetBkHotImage(pstrValue); else if( _tcsicmp(pstrName, _T("bkpushedimage")) == 0 ) SetBkPushedImage(pstrValue); else if( _tcsicmp(pstrName, _T("bkdisabledimage")) == 0 ) SetBkDisabledImage(pstrValue); else if( _tcsicmp(pstrName, _T("hor")) == 0 ) SetHorizontal(_tcsicmp(pstrValue, _T("true")) == 0); else if( _tcsicmp(pstrName, _T("linesize")) == 0 ) SetLineSize(_ttoi(pstrValue)); else if( _tcsicmp(pstrName, _T("range")) == 0 ) SetScrollRange(_ttoi(pstrValue)); else if( _tcsicmp(pstrName, _T("value")) == 0 ) SetScrollPos(_ttoi(pstrValue)); else if( _tcsicmp(pstrName, _T("showbutton1")) == 0 ) SetShowButton1(_tcsicmp(pstrValue, _T("true")) == 0); else if( _tcsicmp(pstrName, _T("showbutton2")) == 0 ) SetShowButton2(_tcsicmp(pstrValue, _T("true")) == 0); else CControlUI::SetAttribute(pstrName, pstrValue); }
/* --------------------------------------------------------------------------- * set the route style to the first one, if the current one doesn't * happen to match any. This way, "revert" won't change the route * style. */ static void set_some_route_style () { if (hid_get_flag ("style")) return; SetLineSize (PCB->RouteStyle[0].Thick); SetViaSize (PCB->RouteStyle[0].Diameter, true); SetViaDrillingHole (PCB->RouteStyle[0].Hole, true); SetKeepawayWidth (PCB->RouteStyle[0].Keepaway); }
void CRoundSliderCtrl::PreSubclassWindow() { CSliderCtrl::PreSubclassWindow(); SetRange(0, 359, FALSE); SetLineSize(1); SetPageSize(10); Init(); }
void MFCQuaRotor::PreSubclassWindow() { CSliderCtrl::PreSubclassWindow(); EnableToolTips(); SetRange(30, 329, FALSE); SetLineSize(3); SetPageSize(30); }
BOOL CRoundSliderCtrl::PreCreateWindow(CREATESTRUCT& cs) { if(!CSliderCtrl::PreCreateWindow(cs)) return FALSE; SetRange(0, 359, FALSE); SetLineSize(3); SetPageSize(10); Init(); return TRUE; }
bool CVolumeCtrl::Create(CWnd* pParentWnd) { if(!CSliderCtrl::Create(WS_CHILD|WS_VISIBLE|TBS_NOTICKS|TBS_HORZ, CRect(0,0,0,0), pParentWnd, IDC_SLIDER1)) return(false); SetRange(0, 120); SetPosInternal(AfxGetCurrentSettings().nVolume); SetPageSize(8); SetLineSize(0); return(true); }
bool CVolumeCtrl::Create(CWnd* pParentWnd) { if (!CSliderCtrl::Create(WS_CHILD | WS_VISIBLE | TBS_NOTICKS | TBS_HORZ | TBS_TOOLTIPS, CRect(0, 0, 0, 0), pParentWnd, IDC_SLIDER1)) { return false; } const CAppSettings& s = AfxGetAppSettings(); EnableToolTips(TRUE); SetRange(0, 100); SetPos(s.nVolume); SetPageSize(s.nVolumeStep); SetLineSize(0); return true; }