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

#include <G4OpenGLXmFourArrowButtons.hh>

+ Inheritance diagram for G4OpenGLXmFourArrowButtons:

Public Member Functions

 G4OpenGLXmFourArrowButtons (XtCallbackRec **=NULL)
 
virtual ~G4OpenGLXmFourArrowButtons ()
 
void SetName (char *)
 
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 G4OpenGLXmFourArrowButtons.hh.

Constructor & Destructor Documentation

◆ G4OpenGLXmFourArrowButtons()

G4OpenGLXmFourArrowButtons::G4OpenGLXmFourArrowButtons ( XtCallbackRec ** c = NULL)

Definition at line 39 of file G4OpenGLXmFourArrowButtons.cc.

40: arrow_form(0)
41, arrow(0)
42, parent(0)
43{
44 callback = c;
45}

◆ ~G4OpenGLXmFourArrowButtons()

G4OpenGLXmFourArrowButtons::~G4OpenGLXmFourArrowButtons ( )
virtual

Definition at line 47 of file G4OpenGLXmFourArrowButtons.cc.

48{}

Member Function Documentation

◆ AddYourselfTo()

void G4OpenGLXmFourArrowButtons::AddYourselfTo ( G4OpenGLXmVWidgetContainer * container)
virtual

Implements G4OpenGLXmVWidgetComponent.

Definition at line 50 of file G4OpenGLXmFourArrowButtons.cc.

51{
52
53 pView = container->GetView ();
54 ProcesspView ();
55
56 parent = container->GetPointerToWidget ();
57
58 arrow_form = XtVaCreateManagedWidget
59 ("arrow_form",
60 xmFormWidgetClass,
61 *parent,
62 XmNfractionBase, 3,
63
64 XtNvisual, visual,
65 XtNdepth, depth,
66 XtNcolormap, cmap,
67 XtNborderColor, borcol,
68 XtNbackground, bgnd,
69
70 NULL);
71
72
73///////////////`up' arrow///////////////
74 arrow = XtVaCreateManagedWidget
75 ("up_arrow",
76 xmArrowButtonGadgetClass,
77 arrow_form,
78
79 XmNtopAttachment, XmATTACH_POSITION,
80 XmNtopPosition, 0,
81
82 XmNbottomAttachment, XmATTACH_POSITION,
83 XmNbottomPosition, 1,
84
85 XmNleftAttachment, XmATTACH_POSITION,
86 XmNleftPosition, 1,
87
88 XmNrightAttachment, XmATTACH_POSITION,
89 XmNrightPosition, 2,
90
91 XmNarrowDirection, XmARROW_UP,
92 XmNuserData, True,
93 NULL);
94
95 XtAddCallbacks (arrow,
96 XmNactivateCallback,
97 callback[0]);
98
99 XtAddCallbacks (arrow,
100 XmNarmCallback,
101 callback[0]);
102
103 XtAddCallbacks (arrow,
104 XmNdisarmCallback,
105 callback[0]);
106
107///////////////`down' arrow///////////////
108 arrow = XtVaCreateManagedWidget
109 ("down_arrow",
110 xmArrowButtonGadgetClass,
111 arrow_form,
112
113 XmNtopAttachment, XmATTACH_POSITION,
114 XmNtopPosition, 2,
115
116 XmNbottomAttachment, XmATTACH_POSITION,
117 XmNbottomPosition, 3,
118
119 XmNleftAttachment, XmATTACH_POSITION,
120 XmNleftPosition, 1,
121
122 XmNrightAttachment, XmATTACH_POSITION,
123 XmNrightPosition, 2,
124
125 XmNarrowDirection, XmARROW_DOWN,
126 XmNuserData, False,
127 NULL);
128
129 XtAddCallbacks (arrow,
130 XmNactivateCallback,
131 callback[1]);
132
133 XtAddCallbacks (arrow,
134 XmNarmCallback,
135 callback[1]);
136
137 XtAddCallbacks (arrow,
138 XmNdisarmCallback,
139 callback[1]);
140
141///////////////`left' arrow///////////////
142 arrow = XtVaCreateManagedWidget
143 ("left_arrow",
144 xmArrowButtonGadgetClass,
145 arrow_form,
146
147 XmNtopAttachment, XmATTACH_POSITION,
148 XmNtopPosition, 1,
149
150 XmNbottomAttachment, XmATTACH_POSITION,
151 XmNbottomPosition, 2,
152
153 XmNleftAttachment, XmATTACH_POSITION,
154 XmNleftPosition, 0,
155
156 XmNrightAttachment, XmATTACH_POSITION,
157 XmNrightPosition, 1,
158
159 XmNarrowDirection, XmARROW_LEFT,
160 XmNuserData, False,
161 NULL);
162
163 XtAddCallbacks (arrow,
164 XmNactivateCallback,
165 callback[2]);
166
167 XtAddCallbacks (arrow,
168 XmNarmCallback,
169 callback[2]);
170
171 XtAddCallbacks (arrow,
172 XmNdisarmCallback,
173 callback[2]);
174
175///////////////`right' arrow///////////////
176 arrow = XtVaCreateManagedWidget
177 ("right_arrow",
178 xmArrowButtonGadgetClass,
179 arrow_form,
180
181 XmNtopAttachment, XmATTACH_POSITION,
182 XmNtopPosition, 1,
183
184 XmNbottomAttachment, XmATTACH_POSITION,
185 XmNbottomPosition, 2,
186
187 XmNleftAttachment, XmATTACH_POSITION,
188 XmNleftPosition, 2,
189
190 XmNrightAttachment, XmATTACH_POSITION,
191 XmNrightPosition, 3,
192
193 XmNarrowDirection, XmARROW_RIGHT,
194 XmNuserData, True,
195 NULL);
196
197 XtAddCallbacks (arrow,
198 XmNactivateCallback,
199 callback[3]);
200
201 XtAddCallbacks (arrow,
202 XmNarmCallback,
203 callback[3]);
204
205 XtAddCallbacks (arrow,
206 XmNdisarmCallback,
207 callback[3]);
208
209}
virtual Widget * GetPointerToWidget()=0

◆ GetName()

char * G4OpenGLXmFourArrowButtons::GetName ( )

◆ GetPointerToParent()

Widget * G4OpenGLXmFourArrowButtons::GetPointerToParent ( )
virtual

Implements G4OpenGLXmVWidgetComponent.

Definition at line 211 of file G4OpenGLXmFourArrowButtons.cc.

212{
213 return parent;
214}

◆ GetPointerToWidget()

Widget * G4OpenGLXmFourArrowButtons::GetPointerToWidget ( )
virtual

Implements G4OpenGLXmVWidgetComponent.

Definition at line 216 of file G4OpenGLXmFourArrowButtons.cc.

217{
218 return &arrow_form;
219}

◆ SetName()

void G4OpenGLXmFourArrowButtons::SetName ( char * )

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