1 /* $TOG: MotifCmds.C /main/5 1998/09/21 18:49:41 mgreess $ */
5 * RESTRICTED CONFIDENTIAL INFORMATION:
7 * The information in this document is subject to special
8 * restrictions in a confidential disclosure agreement bertween
9 * HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
10 * document outside HP, IBM, Sun, USL, SCO, or Univel wihtout
11 * Sun's specific written approval. This documment and all copies
12 * and derivative works thereof must be returned or destroyed at
15 * Copyright 1993 Sun Microsystems, Inc. All rights reserved.
19 #include "MotifCmds.h"
21 SeparatorCmd::SeparatorCmd (
25 ) : Cmd ( name, NULL, active )
37 SeparatorCmd::undoit()
43 ToggleButtonCmd::ToggleButtonCmd (
47 Boolean visible_when_off,
48 unsigned char indicator_type
49 ) : Cmd ( name, label, active )
51 _indicator_type = indicator_type;
52 _visible_when_off = visible_when_off;
57 ToggleButtonCmd::doit()
63 ToggleButtonCmd::undoit()
69 // Returns TRUE if button is ON, FALSE if OFF.
72 ToggleButtonCmd::getButtonState()
77 if (!_ci) return(NULL);
81 toggleButton = ci->baseWidget();
83 return (XmToggleButtonGetState(toggleButton));
88 ToggleButtonCmd::setButtonState(
102 toggleButton = ci->baseWidget();
104 XmToggleButtonSetState(toggleButton, state, notify);
108 #ifndef CAN_INLINE_VIRTUALS
110 ToggleButtonCmd::className( void )
112 return "ToggleButtonCmd";
114 #endif /* ! CAN_INLINE_VIRTUALS */
117 ToggleButtonCmd::indicatorType( void )
119 return _indicator_type;
123 ToggleButtonCmd::visibleWhenOff( void )
125 return _visible_when_off;