Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4OpenGLXmRadioButton Class Reference

#include <G4OpenGLXmRadioButton.hh>

+ Inheritance diagram for G4OpenGLXmRadioButton:

Public Member Functions

 G4OpenGLXmRadioButton (const char *, XtCallbackRec *, G4bool, G4int)
 
virtual ~G4OpenGLXmRadioButton ()
 
void SetName (const char *)
 
const char * GetName ()
 
void AddYourselfTo (G4OpenGLXmVWidgetContainer *)
 
Widget * GetPointerToParent ()
 
Widget * GetPointerToWidget ()
 
- Public Member Functions inherited from G4OpenGLXmVWidgetComponent
 G4OpenGLXmVWidgetComponent ()
 
virtual ~G4OpenGLXmVWidgetComponent ()
 
- Public Member Functions inherited from G4OpenGLXmVWidgetObject
 G4OpenGLXmVWidgetObject ()
 
virtual ~G4OpenGLXmVWidgetObject ()
 
G4OpenGLXmViewerGetView ()
 
void ProcesspView ()
 

Additional Inherited Members

- Protected Member Functions inherited from G4OpenGLXmVWidgetObject
 G4OpenGLXmVWidgetObject (const G4OpenGLXmVWidgetObject &)
 
G4OpenGLXmVWidgetObjectoperator= (const G4OpenGLXmVWidgetObject &)
 
- Protected Attributes inherited from G4OpenGLXmVWidgetObject
G4OpenGLXmViewerpView
 
Colormap cmap
 
Pixel borcol
 
Pixel bgnd
 
unsigned int depth
 
Visual * visual
 
Widget top
 

Detailed Description

Definition at line 36 of file G4OpenGLXmRadioButton.hh.

Constructor & Destructor Documentation

◆ G4OpenGLXmRadioButton()

G4OpenGLXmRadioButton::G4OpenGLXmRadioButton ( const char * n,
XtCallbackRec * c,
G4bool d,
G4int num )

Definition at line 38 of file G4OpenGLXmRadioButton.cc.

42: button(0)
43, parent(0)
44{
45 name = n;
46 callback = c;
47 default_button = d;
48 number = num;
49}

◆ ~G4OpenGLXmRadioButton()

G4OpenGLXmRadioButton::~G4OpenGLXmRadioButton ( )
virtual

Definition at line 51 of file G4OpenGLXmRadioButton.cc.

52{}

Member Function Documentation

◆ AddYourselfTo()

void G4OpenGLXmRadioButton::AddYourselfTo ( G4OpenGLXmVWidgetContainer * container)
virtual

Implements G4OpenGLXmVWidgetComponent.

Definition at line 69 of file G4OpenGLXmRadioButton.cc.

70{
71
72 pView = container->GetView ();
73 ProcesspView ();
74 parent = container->GetPointerToWidget ();
75 XmString button_string = XmStringCreateLocalized ((char*)name);
76 button = XtVaCreateManagedWidget (name,
77 xmToggleButtonWidgetClass,
78 *parent,
79
80 XmNlabelString, button_string,
81 XmNset, default_button,
82 XmNuserData, number,
83
84 XtNvisual, visual,
85 XtNdepth, depth,
86 XtNcolormap, cmap,
87 XtNborderColor, borcol,
88 XtNbackground, bgnd,
89
90 NULL);
91
92 XtAddCallbacks (button,
93 XmNarmCallback,
94 callback);
95
96 XmStringFree (button_string);
97}
virtual Widget * GetPointerToWidget()=0

◆ GetName()

const char * G4OpenGLXmRadioButton::GetName ( )

Definition at line 64 of file G4OpenGLXmRadioButton.cc.

65{
66 return name;
67}

◆ GetPointerToParent()

Widget * G4OpenGLXmRadioButton::GetPointerToParent ( )
virtual

Implements G4OpenGLXmVWidgetComponent.

Definition at line 99 of file G4OpenGLXmRadioButton.cc.

100{
101 return parent;
102}

◆ GetPointerToWidget()

Widget * G4OpenGLXmRadioButton::GetPointerToWidget ( )
virtual

Implements G4OpenGLXmVWidgetComponent.

Definition at line 104 of file G4OpenGLXmRadioButton.cc.

105{
106 return &button;
107}

◆ SetName()

void G4OpenGLXmRadioButton::SetName ( const char * n)

Definition at line 54 of file G4OpenGLXmRadioButton.cc.

55{
56 name = n;
57 XmString button_string = XmStringCreateLocalized ((char*)name);
58 XtVaSetValues (button,
59 XmNlabelString, button_string,
60 NULL);
61 XmStringFree (button_string);
62}

The documentation for this class was generated from the following files: