// /// Toggle the state of the item. /// If the item has three states, the cycle goes from /// unchecked -> checked -> indeterminate -> back to unchecked. /// Otherwise the state toggles between /// unchecked and checked. // void TCheckListItem::Toggle() { if (!IsEnabled()) return; if (HasThreeStates) { if (IsIndeterminate()) Uncheck(); else if (IsChecked()) SetIndeterminate(); else Check(); } else { if (IsChecked()) Uncheck(); else Check(); } }
/*>UpdateChecks(void) ------------------ Ensures that the menu check marks match the actual status of the appropriate flags. 24.07.92 Original 13.08.92 Added correct style ticking (if style reselected). 09.09.92 Added regression, fourier and rexxfit */ UpdateChecks(void) { if(graph.logx) Check(MenuLogX); else Uncheck(MenuLogX); if(graph.logy) Check(MenuLogY); else Uncheck(MenuLogY); if(graph.errors) Check(MenuErrors); else Uncheck(MenuErrors); if(graph.boxed) Check(MenuBoxed); else Uncheck(MenuBoxed); if(graph.grid) Check(MenuGrid); else Uncheck(MenuGrid); if(graph.fzero) Check(MenuFZero); else Uncheck(MenuFZero); if(rexx.debug) Check(MenuDebRexx); else Uncheck(MenuDebRexx); if(fitting.robust) Check(MenuRobust); else Uncheck(MenuRobust); if(fitting.regression) Check(MenuRegress); else Uncheck(MenuRegress); if(fitting.fourier) Check(MenuFourier); else Uncheck(MenuFourier); if(fitting.rexx) Check(MenuRexxFit); else Uncheck(MenuRexxFit); Uncheck(MenuXY); Uncheck(MenuScatter); Uncheck(MenuBar); Uncheck(MenuPie); switch(graph.style) { case STYLE_LINE: Check(MenuXY); break; case STYLE_SCATTER: Check(MenuScatter); break; case STYLE_BAR: Check(MenuBar); break; case STYLE_PIE: Check(MenuPie); break; default: break; } return(0); }