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

#include <G4OpenGLXmPushButton.hh>

+ Inheritance diagram for G4OpenGLXmPushButton:

Public Member Functions

 G4OpenGLXmPushButton (const char *=NULL, XtCallbackRec *=NULL)
 
virtual ~G4OpenGLXmPushButton ()
 
void SetName (const char *)
 
const char * GetName ()
 
void AddYourselfTo (G4OpenGLXmVWidgetContainer *)
 
Widget * GetPointerToParent ()
 
Widget * GetPointerToWidget ()
 
- Public Member Functions inherited from G4OpenGLXmVWidgetComponent
 G4OpenGLXmVWidgetComponent ()
 
virtual ~G4OpenGLXmVWidgetComponent ()
 
virtual void AddYourselfTo (G4OpenGLXmVWidgetContainer *)=0
 
virtual Widget * GetPointerToParent ()=0
 
virtual Widget * GetPointerToWidget ()=0
 
- 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 G4OpenGLXmPushButton.hh.

Constructor & Destructor Documentation

◆ G4OpenGLXmPushButton()

G4OpenGLXmPushButton::G4OpenGLXmPushButton ( const char *  n = NULL,
XtCallbackRec *  c = NULL 
)

Definition at line 38 of file G4OpenGLXmPushButton.cc.

40: button(0)
41, parent(0)
42{
43 name = n;
44 callback = c;
45}

◆ ~G4OpenGLXmPushButton()

G4OpenGLXmPushButton::~G4OpenGLXmPushButton ( )
virtual

Definition at line 47 of file G4OpenGLXmPushButton.cc.

48{}

Member Function Documentation

◆ AddYourselfTo()

void G4OpenGLXmPushButton::AddYourselfTo ( G4OpenGLXmVWidgetContainer container)
virtual

Implements G4OpenGLXmVWidgetComponent.

Definition at line 65 of file G4OpenGLXmPushButton.cc.

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

◆ GetName()

const char * G4OpenGLXmPushButton::GetName ( )

Definition at line 60 of file G4OpenGLXmPushButton.cc.

61{
62 return name;
63}

◆ GetPointerToParent()

Widget * G4OpenGLXmPushButton::GetPointerToParent ( )
virtual

Implements G4OpenGLXmVWidgetComponent.

Definition at line 96 of file G4OpenGLXmPushButton.cc.

97{
98 return parent;
99}

◆ GetPointerToWidget()

Widget * G4OpenGLXmPushButton::GetPointerToWidget ( )
virtual

Implements G4OpenGLXmVWidgetComponent.

Definition at line 101 of file G4OpenGLXmPushButton.cc.

102{
103 return &button;
104}

◆ SetName()

void G4OpenGLXmPushButton::SetName ( const char *  n)

Definition at line 50 of file G4OpenGLXmPushButton.cc.

51{
52 name = n;
53 XmString button_string = XmStringCreateLocalized ((char*)name);
54 XtVaSetValues (button,
55 XmNlabelString, button_string,
56 NULL);
57 XmStringFree (button_string);
58}

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