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

#include <G4OpenGLXmBox.hh>

+ Inheritance diagram for G4OpenGLXmBox:

Public Member Functions

 G4OpenGLXmBox (const char *=NULL, G4bool=False)
 
virtual ~G4OpenGLXmBox ()
 
void AddChild (G4OpenGLXmVWidgetComponent *)
 
void AddYourselfTo (G4OpenGLXmVWidgetShell *)
 
Widget * GetPointerToParent ()
 
Widget * GetPointerToWidget ()
 
const char * GetName ()
 
void SetName (const char *)
 
- Public Member Functions inherited from G4OpenGLXmVWidgetContainer
 G4OpenGLXmVWidgetContainer ()
 
virtual ~G4OpenGLXmVWidgetContainer ()
 
virtual void AddChild (G4OpenGLXmVWidgetComponent *)=0
 
virtual void AddYourselfTo (G4OpenGLXmVWidgetShell *)=0
 
virtual Widget * GetPointerToParent ()=0
 
virtual Widget * GetPointerToWidget ()=0
 
- Public Member Functions inherited from G4OpenGLXmVWidgetObject
 G4OpenGLXmVWidgetObject ()
 
virtual ~G4OpenGLXmVWidgetObject ()
 
G4OpenGLXmViewerGetView ()
 
void ProcesspView ()
 

Protected Attributes

const char * name
 
Widget * parent
 
Widget box_row_col
 
G4bool radio
 
- Protected Attributes inherited from G4OpenGLXmVWidgetObject
G4OpenGLXmViewerpView
 
Colormap cmap
 
Pixel borcol
 
Pixel bgnd
 
unsigned int depth
 
Visual * visual
 
Widget top
 

Additional Inherited Members

- Protected Member Functions inherited from G4OpenGLXmVWidgetObject
 G4OpenGLXmVWidgetObject (const G4OpenGLXmVWidgetObject &)
 
G4OpenGLXmVWidgetObjectoperator= (const G4OpenGLXmVWidgetObject &)
 

Detailed Description

Definition at line 40 of file G4OpenGLXmBox.hh.

Constructor & Destructor Documentation

◆ G4OpenGLXmBox()

G4OpenGLXmBox::G4OpenGLXmBox ( const char *  n = NULL,
G4bool  r = False 
)

Definition at line 37 of file G4OpenGLXmBox.cc.

39{
40 name = n;
41 radio = r;
42 parent = NULL;
43 box_row_col = NULL;
44}
const char * name
Widget * parent
Widget box_row_col

◆ ~G4OpenGLXmBox()

G4OpenGLXmBox::~G4OpenGLXmBox ( )
virtual

Definition at line 46 of file G4OpenGLXmBox.cc.

47{}

Member Function Documentation

◆ AddChild()

void G4OpenGLXmBox::AddChild ( G4OpenGLXmVWidgetComponent component)
virtual

Implements G4OpenGLXmVWidgetContainer.

Reimplemented in G4OpenGLXmFramedBox.

Definition at line 49 of file G4OpenGLXmBox.cc.

50{
51 component->AddYourselfTo(this);
52 Cardinal num_children;
53 XtVaGetValues (box_row_col,
54 XmNnumChildren, &num_children,
55 NULL);
56// G4cout << name << " now parents " << num_children << " children." << G4endl;
57}
virtual void AddYourselfTo(G4OpenGLXmVWidgetContainer *)=0

Referenced by G4OpenGLXmViewer::actions_callback().

◆ AddYourselfTo()

void G4OpenGLXmBox::AddYourselfTo ( G4OpenGLXmVWidgetShell window)
virtual

Implements G4OpenGLXmVWidgetContainer.

Reimplemented in G4OpenGLXmFramedBox.

Definition at line 59 of file G4OpenGLXmBox.cc.

60{
61
62 pView = window->GetView ();
63 ProcesspView ();
64 parent = window->GetPointerToWidget ();
65
66 box_row_col = XtVaCreateManagedWidget (name,
67 xmRowColumnWidgetClass,
68 *parent,
69
70 XmNadjustMargin, True,
71 XmNisHomogeneous, False,
72 XmNlabelString, (XmString)name,
73 XmNradioAlwaysOne, radio,
74 XmNradioBehavior, radio,
75
76 XtNvisual, visual,
77 XtNdepth, depth,
78 XtNcolormap, cmap,
79 XtNborderColor, borcol,
80 XtNbackground, bgnd,
81
82 NULL);
83
84}
virtual Widget * GetPointerToWidget()=0

◆ GetName()

const char * G4OpenGLXmBox::GetName ( )

Definition at line 96 of file G4OpenGLXmBox.cc.

97{
98 return name;
99}

◆ GetPointerToParent()

Widget * G4OpenGLXmBox::GetPointerToParent ( )
virtual

Implements G4OpenGLXmVWidgetContainer.

Definition at line 86 of file G4OpenGLXmBox.cc.

87{
88 return parent;
89}

◆ GetPointerToWidget()

Widget * G4OpenGLXmBox::GetPointerToWidget ( )
virtual

Implements G4OpenGLXmVWidgetContainer.

Definition at line 91 of file G4OpenGLXmBox.cc.

92{
93 return &box_row_col;
94}

◆ SetName()

void G4OpenGLXmBox::SetName ( const char *  n)

Definition at line 101 of file G4OpenGLXmBox.cc.

102{
103 name = n;
104}

Member Data Documentation

◆ box_row_col

Widget G4OpenGLXmBox::box_row_col
protected

◆ name

const char* G4OpenGLXmBox::name
protected

◆ parent

Widget* G4OpenGLXmBox::parent
protected

◆ radio

G4bool G4OpenGLXmBox::radio
protected

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