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

#include <G4OpenGLXmTopLevelShell.hh>

+ Inheritance diagram for G4OpenGLXmTopLevelShell:

Public Member Functions

 G4OpenGLXmTopLevelShell (G4OpenGLXmViewer *, char *)
 
virtual ~G4OpenGLXmTopLevelShell ()
 
void AddChild (G4OpenGLXmVWidgetContainer *)
 
void Realize ()
 
Widget * GetPointerToWidget ()
 
char * GetName ()
 
- Public Member Functions inherited from G4OpenGLXmVWidgetShell
 G4OpenGLXmVWidgetShell ()
 
virtual ~G4OpenGLXmVWidgetShell ()
 
virtual Widget * GetPointerToWidget ()=0
 
virtual void AddChild (G4OpenGLXmVWidgetContainer *)=0
 
virtual void Realize ()=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 38 of file G4OpenGLXmTopLevelShell.hh.

Constructor & Destructor Documentation

◆ G4OpenGLXmTopLevelShell()

G4OpenGLXmTopLevelShell::G4OpenGLXmTopLevelShell ( G4OpenGLXmViewer v,
char *  n 
)

Definition at line 37 of file G4OpenGLXmTopLevelShell.cc.

39{
40 pView = v;
41 ProcesspView ();
42 name = n;
43 toplevel = XtVaCreatePopupShell
44 (name,
45 topLevelShellWidgetClass,
46 top,
47
48 XtNiconName, name,
49 XtNtitle, name,
50 XmNdeleteResponse, XmDO_NOTHING,
51 XmNisHomogeneous, False,
52
53 XtNvisual, visual,
54 XtNdepth, depth,
55 XtNcolormap, cmap,
56 XtNborderColor, borcol,
57 XtNbackground, bgnd,
58 NULL);
59
60 frame = XtVaCreateManagedWidget (name,
61 xmFrameWidgetClass,
62 toplevel,
63
64 XtNvisual, visual,
65 XtNdepth, depth,
66 XtNcolormap, cmap,
67 XtNborderColor, borcol,
68 XtNbackground, bgnd,
69
70 NULL);
71
72
73
74 top_box = XtVaCreateManagedWidget (name,
75 xmRowColumnWidgetClass,
76 frame,
77
78 XmNadjustMargin, True,
79 XmNisHomogeneous, False,
80
81 XtNvisual, visual,
82 XtNdepth, depth,
83 XtNcolormap, cmap,
84 XtNborderColor, borcol,
85 XtNbackground, bgnd,
86
87 NULL);
88
89}

◆ ~G4OpenGLXmTopLevelShell()

G4OpenGLXmTopLevelShell::~G4OpenGLXmTopLevelShell ( )
virtual

Definition at line 91 of file G4OpenGLXmTopLevelShell.cc.

92{
93 XtDestroyWidget (toplevel);
94}

Member Function Documentation

◆ AddChild()

void G4OpenGLXmTopLevelShell::AddChild ( G4OpenGLXmVWidgetContainer container)
virtual

Implements G4OpenGLXmVWidgetShell.

Definition at line 96 of file G4OpenGLXmTopLevelShell.cc.

97{
98 container->AddYourselfTo (this);
99}
virtual void AddYourselfTo(G4OpenGLXmVWidgetShell *)=0

Referenced by G4OpenGLXmViewer::actions_callback(), and G4OpenGLXmViewer::misc_callback().

◆ GetName()

char * G4OpenGLXmTopLevelShell::GetName ( )

Definition at line 118 of file G4OpenGLXmTopLevelShell.cc.

119{
120 return name;
121}

◆ GetPointerToWidget()

Widget * G4OpenGLXmTopLevelShell::GetPointerToWidget ( )
virtual

Implements G4OpenGLXmVWidgetShell.

Definition at line 113 of file G4OpenGLXmTopLevelShell.cc.

114{
115 return &top_box;
116}

◆ Realize()

void G4OpenGLXmTopLevelShell::Realize ( )
virtual

Implements G4OpenGLXmVWidgetShell.

Definition at line 101 of file G4OpenGLXmTopLevelShell.cc.

102{
103 Cardinal num_children;
104 XtVaGetValues (toplevel,
105 XmNnumChildren, &num_children,
106 NULL);
107// G4cout << name << " now parents " << num_children << " children." << G4endl;
108 XtManageChild (toplevel);
109 XtRealizeWidget (toplevel);
110 XtPopup (toplevel, XtGrabNonexclusive);
111}

Referenced by G4OpenGLXmViewer::actions_callback(), and G4OpenGLXmViewer::misc_callback().


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