source: trunk/source/visualization/OpenGL/src/G4OpenGLXmFramedBox.cc@ 1177

Last change on this file since 1177 was 915, checked in by garnier, 17 years ago

print improvments begin, see History file

  • Property svn:mime-type set to text/cpp
File size: 3.4 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27// $Id: G4OpenGLXmFramedBox.cc,v 1.8 2009/02/04 16:48:41 lgarnier Exp $
28// GEANT4 tag $Name: $
29//
30//Framed box container class
31
32#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
33
34#include "G4OpenGLXmBox.hh"
35#include "G4OpenGLXmFramedBox.hh"
36#include "G4OpenGLXmVWidgetComponent.hh"
37#include "G4OpenGLXmVWidgetShell.hh"
38#include <Xm/RowColumn.h>
39#include <Xm/Frame.h>
40
41G4OpenGLXmFramedBox::G4OpenGLXmFramedBox (const char* n,
42 G4bool r) :
43G4OpenGLXmBox (n, r)
44{
45 frame = NULL;
46}
47
48G4OpenGLXmFramedBox::~G4OpenGLXmFramedBox ()
49{}
50
51void G4OpenGLXmFramedBox::AddChild (G4OpenGLXmVWidgetComponent* component)
52{
53 component->AddYourselfTo(this);
54 Cardinal num_children;
55 XtVaGetValues (box_row_col,
56 XmNnumChildren, &num_children,
57 NULL);
58// G4cout << name << " now parents " << num_children << " children." << G4endl;
59}
60
61void G4OpenGLXmFramedBox::AddYourselfTo (G4OpenGLXmVWidgetShell* window)
62{
63
64 pView = window->GetView ();
65 ProcesspView ();
66 char framename[50];
67 strcpy (framename, name);
68 strcat (framename, "_frame");
69
70 parent = window->GetPointerToWidget ();
71 frame = XtVaCreateManagedWidget (framename,
72 xmFrameWidgetClass,
73 *parent,
74
75 XtNvisual, visual,
76 XtNdepth, depth,
77 XtNcolormap, cmap,
78 XtNborderColor, borcol,
79 XtNbackground, bgnd,
80
81 NULL);
82
83
84
85 box_row_col = XtVaCreateManagedWidget (name,
86 xmRowColumnWidgetClass,
87 frame,
88
89 XmNadjustMargin, True,
90 XmNisHomogeneous, False,
91 XmNlabelString, (XmString)name,
92 XmNradioAlwaysOne, radio,
93 XmNradioBehavior, radio,
94
95 XtNvisual, visual,
96 XtNdepth, depth,
97 XtNcolormap, cmap,
98 XtNborderColor, borcol,
99 XtNbackground, bgnd,
100
101 NULL);
102
103}
104
105#endif
Note: See TracBrowser for help on using the repository browser.