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 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /visualization/OpenGL/src/G4OpenGLXmFourArrowButtons.cc (Version 11.3.0) and /visualization/OpenGL/src/G4OpenGLXmFourArrowButtons.cc (Version 8.2.p1)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 //                                                 26 //
                                                   >>  27 // $Id: G4OpenGLXmFourArrowButtons.cc,v 1.5 2006/06/29 21:19:44 gunter Exp $
                                                   >>  28 // GEANT4 tag $Name: geant4-08-01-patch-01 $
 27 //                                                 29 //
 28 //Four arrow buttons class. Inherits from G4Op     30 //Four arrow buttons class. Inherits from G4OpenGLXmVWidgetComponent
 29                                                    31 
                                                   >>  32 #ifdef G4VIS_BUILD_OPENGLXM_DRIVER
                                                   >>  33 
 30 #include "G4OpenGLXmVWidgetComponent.hh"           34 #include "G4OpenGLXmVWidgetComponent.hh"
 31 #include "G4OpenGLXmVWidgetContainer.hh"           35 #include "G4OpenGLXmVWidgetContainer.hh"
 32 #include "G4OpenGLXmFourArrowButtons.hh"           36 #include "G4OpenGLXmFourArrowButtons.hh"
 33 #include <X11/Intrinsic.h>                         37 #include <X11/Intrinsic.h>
 34 #include <Xm/Form.h>                           << 
 35 #include <Xm/ArrowBG.h>                        << 
 36                                                << 
 37 #include "globals.hh"                              38 #include "globals.hh"
 38                                                    39 
 39 G4OpenGLXmFourArrowButtons::G4OpenGLXmFourArro     40 G4OpenGLXmFourArrowButtons::G4OpenGLXmFourArrowButtons (XtCallbackRec** c)
 40 : arrow_form(0)                                << 
 41 , arrow(0)                                     << 
 42 , parent(0)                                    << 
 43 {                                                  41 {
 44   callback = c;                                    42   callback = c;
 45 }                                                  43 }
 46                                                    44 
 47 G4OpenGLXmFourArrowButtons::~G4OpenGLXmFourArr     45 G4OpenGLXmFourArrowButtons::~G4OpenGLXmFourArrowButtons ()
 48 {}                                                 46 {}
 49                                                    47 
 50 void G4OpenGLXmFourArrowButtons::AddYourselfTo     48 void G4OpenGLXmFourArrowButtons::AddYourselfTo (G4OpenGLXmVWidgetContainer* container)
 51 {                                                  49 {
 52                                                    50 
 53   pView = container->GetView ();                   51   pView = container->GetView ();
 54   ProcesspView ();                                 52   ProcesspView ();
 55                                                    53 
 56   parent = container->GetPointerToWidget ();       54   parent = container->GetPointerToWidget ();
 57                                                    55 
 58   arrow_form = XtVaCreateManagedWidget             56   arrow_form = XtVaCreateManagedWidget 
 59     ("arrow_form",                                 57     ("arrow_form",
 60      xmFormWidgetClass,                            58      xmFormWidgetClass,
 61      *parent,                                      59      *parent,
 62      XmNfractionBase, 3,                           60      XmNfractionBase, 3,
 63                                                    61 
 64      XtNvisual, visual,                            62      XtNvisual, visual, 
 65      XtNdepth, depth,                              63      XtNdepth, depth, 
 66      XtNcolormap, cmap,                            64      XtNcolormap, cmap, 
 67      XtNborderColor, borcol,                       65      XtNborderColor, borcol,
 68      XtNbackground, bgnd,                          66      XtNbackground, bgnd,
 69                                                    67 
 70      NULL);                                        68      NULL);
 71                                                    69 
 72                                                    70 
 73 ///////////////`up' arrow///////////////           71 ///////////////`up' arrow///////////////  
 74   arrow = XtVaCreateManagedWidget                  72   arrow = XtVaCreateManagedWidget 
 75     ("up_arrow",                                   73     ("up_arrow",
 76      xmArrowButtonGadgetClass,                     74      xmArrowButtonGadgetClass, 
 77      arrow_form,                                   75      arrow_form,
 78                                                    76      
 79      XmNtopAttachment, XmATTACH_POSITION,          77      XmNtopAttachment, XmATTACH_POSITION,
 80      XmNtopPosition, 0,                            78      XmNtopPosition, 0,
 81                                                    79      
 82      XmNbottomAttachment, XmATTACH_POSITION,       80      XmNbottomAttachment, XmATTACH_POSITION,
 83      XmNbottomPosition, 1,                         81      XmNbottomPosition, 1,
 84                                                    82      
 85      XmNleftAttachment, XmATTACH_POSITION,         83      XmNleftAttachment, XmATTACH_POSITION,
 86      XmNleftPosition, 1,                           84      XmNleftPosition, 1,
 87                                                    85 
 88      XmNrightAttachment, XmATTACH_POSITION,        86      XmNrightAttachment, XmATTACH_POSITION,
 89      XmNrightPosition, 2,                          87      XmNrightPosition, 2,
 90                                                    88 
 91      XmNarrowDirection, XmARROW_UP,                89      XmNarrowDirection, XmARROW_UP,
 92      XmNuserData, True,                            90      XmNuserData, True,
 93      NULL);                                        91      NULL);
 94                                                    92   
 95   XtAddCallbacks (arrow,                           93   XtAddCallbacks (arrow, 
 96       XmNactivateCallback,                         94       XmNactivateCallback, 
 97       callback[0]);                                95       callback[0]);
 98                                                    96   
 99   XtAddCallbacks (arrow,                           97   XtAddCallbacks (arrow, 
100       XmNarmCallback,                              98       XmNarmCallback, 
101       callback[0]);                                99       callback[0]);
102                                                   100   
103   XtAddCallbacks (arrow,                          101   XtAddCallbacks (arrow, 
104       XmNdisarmCallback,                          102       XmNdisarmCallback, 
105       callback[0]);                               103       callback[0]);
106                                                   104   
107 ///////////////`down' arrow///////////////        105 ///////////////`down' arrow///////////////  
108   arrow = XtVaCreateManagedWidget                 106   arrow = XtVaCreateManagedWidget 
109     ("down_arrow",                                107     ("down_arrow",
110      xmArrowButtonGadgetClass,                    108      xmArrowButtonGadgetClass, 
111      arrow_form,                                  109      arrow_form,
112                                                   110      
113      XmNtopAttachment, XmATTACH_POSITION,         111      XmNtopAttachment, XmATTACH_POSITION,
114      XmNtopPosition, 2,                           112      XmNtopPosition, 2,
115                                                   113 
116      XmNbottomAttachment, XmATTACH_POSITION,      114      XmNbottomAttachment, XmATTACH_POSITION,
117      XmNbottomPosition, 3,                        115      XmNbottomPosition, 3,
118                                                   116 
119      XmNleftAttachment, XmATTACH_POSITION,        117      XmNleftAttachment, XmATTACH_POSITION,
120      XmNleftPosition, 1,                          118      XmNleftPosition, 1,
121                                                   119 
122      XmNrightAttachment, XmATTACH_POSITION,       120      XmNrightAttachment, XmATTACH_POSITION,
123      XmNrightPosition, 2,                         121      XmNrightPosition, 2,
124                                                   122 
125      XmNarrowDirection, XmARROW_DOWN,             123      XmNarrowDirection, XmARROW_DOWN,
126      XmNuserData, False,                          124      XmNuserData, False,
127      NULL);                                       125      NULL);
128                                                   126   
129   XtAddCallbacks (arrow,                          127   XtAddCallbacks (arrow, 
130       XmNactivateCallback,                        128       XmNactivateCallback, 
131       callback[1]);                               129       callback[1]);
132                                                   130   
133   XtAddCallbacks (arrow,                          131   XtAddCallbacks (arrow, 
134       XmNarmCallback,                             132       XmNarmCallback, 
135       callback[1]);                               133       callback[1]);
136                                                   134   
137   XtAddCallbacks (arrow,                          135   XtAddCallbacks (arrow, 
138       XmNdisarmCallback,                          136       XmNdisarmCallback, 
139       callback[1]);                               137       callback[1]);
140                                                   138   
141 ///////////////`left' arrow///////////////        139 ///////////////`left' arrow///////////////  
142   arrow = XtVaCreateManagedWidget                 140   arrow = XtVaCreateManagedWidget 
143     ("left_arrow",                                141     ("left_arrow",
144      xmArrowButtonGadgetClass,                    142      xmArrowButtonGadgetClass, 
145      arrow_form,                                  143      arrow_form,
146                                                   144      
147      XmNtopAttachment, XmATTACH_POSITION,         145      XmNtopAttachment, XmATTACH_POSITION,
148      XmNtopPosition, 1,                           146      XmNtopPosition, 1,
149                                                   147      
150      XmNbottomAttachment, XmATTACH_POSITION,      148      XmNbottomAttachment, XmATTACH_POSITION,
151      XmNbottomPosition, 2,                        149      XmNbottomPosition, 2,
152                                                   150      
153      XmNleftAttachment, XmATTACH_POSITION,        151      XmNleftAttachment, XmATTACH_POSITION,
154      XmNleftPosition, 0,                          152      XmNleftPosition, 0,
155                                                   153      
156      XmNrightAttachment, XmATTACH_POSITION,       154      XmNrightAttachment, XmATTACH_POSITION,
157      XmNrightPosition, 1,                         155      XmNrightPosition, 1,
158                                                   156      
159      XmNarrowDirection, XmARROW_LEFT,             157      XmNarrowDirection, XmARROW_LEFT,
160      XmNuserData, False,                          158      XmNuserData, False,
161      NULL);                                       159      NULL);
162                                                   160   
163   XtAddCallbacks (arrow,                          161   XtAddCallbacks (arrow, 
164       XmNactivateCallback,                        162       XmNactivateCallback, 
165       callback[2]);                               163       callback[2]);
166                                                   164   
167   XtAddCallbacks (arrow,                          165   XtAddCallbacks (arrow, 
168       XmNarmCallback,                             166       XmNarmCallback, 
169       callback[2]);                               167       callback[2]);
170                                                   168   
171   XtAddCallbacks (arrow,                          169   XtAddCallbacks (arrow, 
172       XmNdisarmCallback,                          170       XmNdisarmCallback, 
173       callback[2]);                               171       callback[2]);
174                                                   172   
175 ///////////////`right' arrow///////////////       173 ///////////////`right' arrow///////////////  
176   arrow = XtVaCreateManagedWidget                 174   arrow = XtVaCreateManagedWidget 
177     ("right_arrow",                               175     ("right_arrow",
178      xmArrowButtonGadgetClass,                    176      xmArrowButtonGadgetClass, 
179      arrow_form,                                  177      arrow_form,
180                                                   178      
181      XmNtopAttachment, XmATTACH_POSITION,         179      XmNtopAttachment, XmATTACH_POSITION,
182      XmNtopPosition, 1,                           180      XmNtopPosition, 1,
183                                                   181      
184      XmNbottomAttachment, XmATTACH_POSITION,      182      XmNbottomAttachment, XmATTACH_POSITION,
185      XmNbottomPosition, 2,                        183      XmNbottomPosition, 2,
186                                                   184 
187      XmNleftAttachment, XmATTACH_POSITION,        185      XmNleftAttachment, XmATTACH_POSITION,
188      XmNleftPosition, 2,                          186      XmNleftPosition, 2,
189                                                   187 
190      XmNrightAttachment, XmATTACH_POSITION,       188      XmNrightAttachment, XmATTACH_POSITION,
191      XmNrightPosition, 3,                         189      XmNrightPosition, 3,
192                                                   190 
193      XmNarrowDirection, XmARROW_RIGHT,            191      XmNarrowDirection, XmARROW_RIGHT,
194      XmNuserData, True,                           192      XmNuserData, True,
195      NULL);                                       193      NULL);
196                                                   194   
197   XtAddCallbacks (arrow,                          195   XtAddCallbacks (arrow, 
198       XmNactivateCallback,                        196       XmNactivateCallback, 
199       callback[3]);                               197       callback[3]);
200                                                   198   
201   XtAddCallbacks (arrow,                          199   XtAddCallbacks (arrow, 
202       XmNarmCallback,                             200       XmNarmCallback, 
203       callback[3]);                               201       callback[3]);
204                                                   202   
205   XtAddCallbacks (arrow,                          203   XtAddCallbacks (arrow, 
206       XmNdisarmCallback,                          204       XmNdisarmCallback, 
207       callback[3]);                               205       callback[3]);
208                                                   206 
209 }                                                 207 }
210                                                   208 
211 Widget* G4OpenGLXmFourArrowButtons::GetPointer    209 Widget* G4OpenGLXmFourArrowButtons::GetPointerToParent ()
212 {                                                 210 {
213   return parent;                                  211   return parent;
214 }                                                 212 }
215                                                   213 
216 Widget* G4OpenGLXmFourArrowButtons::GetPointer    214 Widget* G4OpenGLXmFourArrowButtons::GetPointerToWidget () 
217 {                                                 215 {
218   return &arrow_form;                             216   return &arrow_form;
219 }                                                 217 }
                                                   >> 218 
                                                   >> 219 #endif
220                                                   220