Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/interfaces/implementation/src/G4UIXm.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 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 ]

  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 //
 28 // G.Barrand
 29 
 30 // #define DEBUG
 31 
 32 #include "G4UIXm.hh"
 33 
 34 #include "G4StateManager.hh"
 35 #include "G4Types.hh"
 36 #include "G4UIcommandStatus.hh"
 37 #include "G4UIcommandTree.hh"
 38 #include "G4UImanager.hh"
 39 #include "G4Xt.hh"
 40 
 41 #include <X11/Intrinsic.h>
 42 #include <X11/Shell.h>
 43 #include <X11/keysym.h>
 44 #include <Xm/CascadeB.h>
 45 #include <Xm/Command.h>
 46 #include <Xm/Form.h>
 47 #include <Xm/PushB.h>
 48 #include <Xm/RowColumn.h>
 49 #include <Xm/Text.h>
 50 #include <Xm/Xm.h>
 51 #include <stdlib.h>
 52 #include <string.h>
 53 
 54 static void XmTextAppendString(Widget, char*);
 55 
 56 static void clearButtonCallback(Widget, XtPointer, XtPointer);
 57 
 58 static char* XmConvertCompoundStringToString(XmString, G4int);
 59 static G4bool ConvertStringToInt(const char*, G4int&);
 60 static void ExecuteChangeSizeFunction(Widget);
 61 
 62 static G4bool exitSession = true;
 63 static G4bool exitPause = true;
 64 static G4bool exitHelp = true;
 65 /***************************************************************************/
 66 G4UIXm::G4UIXm(G4int argc, char** argv)
 67   : shell(NULL), command(NULL), menuBar(NULL), text(NULL), fHelp(false), fHelpChoice(0)
 68 /***************************************************************************/
 69 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
 70 {
 71   G4UImanager* UI = G4UImanager::GetUIpointer();
 72   if (UI != NULL) UI->SetSession(this);
 73 
 74   G4Xt* interactorManager = G4Xt::getInstance(argc, argv, (char*)"Xm");
 75 
 76   Widget top = (Widget)interactorManager->GetMainInteractor();
 77 
 78   if (std::getenv("XENVIRONMENT") == NULL) {
 79     XrmDatabase database = XrmGetDatabase(XtDisplay(top));
 80     if (database != NULL) {
 81       XrmPutLineResource(&database, "*topShadowColor:white");
 82       XrmPutLineResource(&database, "*bottomShadowColor:black");
 83       XrmPutLineResource(&database, "*foreground:black");
 84       XrmPutLineResource(&database, "*background:lightgrey");
 85       XrmPutLineResource(&database, "*borderColor:lightgrey");
 86       XrmPutLineResource(&database, "*fontList:-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1");
 87       XrmPutLineResource(&database, "*text.background:white");
 88       XrmPutLineResource(&database, "*text.fontList:*courier*-r-*--14-*");
 89       XrmPutLineResource(&database, "*text.maxLength:8000");
 90     }
 91   }
 92 
 93   Arg args[9];
 94   XtSetArg(args[0], XmNkeyboardFocusPolicy, XmPOINTER);  // For completion.
 95   shell = XtAppCreateShell("G4UIXm", "G4UIXm", topLevelShellWidgetClass, XtDisplay(top), args, 1);
 96   form = XmCreateForm(shell, (char*)menu_str[0].c_str(), NULL, 0);
 97   XtManageChild(form);
 98 
 99   XtSetArg(args[0], XmNtopAttachment, XmATTACH_FORM);
100   XtSetArg(args[1], XmNleftAttachment, XmATTACH_FORM);
101   XtSetArg(args[2], XmNrightAttachment, XmATTACH_FORM);
102   menuBar = XmCreateMenuBar(form, (char*)menu_str[1].c_str(), args, 3);
103 
104   XtSetArg(args[0], XmNtopAttachment, XmATTACH_NONE);
105   XtSetArg(args[1], XmNleftAttachment, XmATTACH_FORM);
106   XtSetArg(args[2], XmNrightAttachment, XmATTACH_FORM);
107   XtSetArg(args[3], XmNbottomAttachment, XmATTACH_FORM);
108   command = XmCreateCommand(form, (char*)menu_str[2].c_str(), args, 4);
109   XtManageChild(command);
110 
111   XtSetArg(args[0], XmNtopAttachment, XmATTACH_NONE);
112   XtSetArg(args[1], XmNleftAttachment, XmATTACH_FORM);
113   XtSetArg(args[2], XmNrightAttachment, XmATTACH_FORM);
114   XtSetArg(args[3], XmNbottomAttachment, XmATTACH_WIDGET);
115   XtSetArg(args[4], XmNbottomWidget, command);
116   XmString cps = XmStringLtoRCreate((char*)menu_str[3].c_str(), (char*)XmSTRING_DEFAULT_CHARSET);
117   XtSetArg(args[5], XmNlabelString, cps);
118   Widget clearButton = XmCreatePushButton(form, (char*)menu_str[4].c_str(), args, 6);
119   XmStringFree(cps);
120   XtManageChild(clearButton);
121 
122   XtSetArg(args[0], XmNtopAttachment, XmATTACH_WIDGET);
123   XtSetArg(args[1], XmNtopWidget, menuBar);
124   XtSetArg(args[2], XmNleftAttachment, XmATTACH_FORM);
125   XtSetArg(args[3], XmNrightAttachment, XmATTACH_FORM);
126   XtSetArg(args[4], XmNbottomAttachment, XmATTACH_WIDGET);
127   XtSetArg(args[5], XmNbottomWidget, clearButton);
128   XtSetArg(args[6], XmNeditMode, XmMULTI_LINE_EDIT);
129   XtSetArg(args[7], XmNrows, 12);
130   XtSetArg(args[8], XmNcolumns, 80);
131   text = XmCreateScrolledText(form, (char*)menu_str[5].c_str(), args, 9);
132   XtManageChild(text);
133 
134   XtAddCallback(clearButton, XmNactivateCallback, clearButtonCallback, (XtPointer)text);
135   XtAddCallback(command, XmNcommandEnteredCallback, CommandEnteredCallback, (XtPointer)this);
136 
137   Widget commandText = XmCommandGetChild(command, XmDIALOG_COMMAND_TEXT);
138   XtAddEventHandler(commandText, KeyPressMask, False, keyHandler, (XtPointer)this);
139 
140   XtRealizeWidget(shell);
141   XtMapWidget(shell);
142 
143   if (UI != NULL) UI->SetCoutDestination(this);
144 }
145 /***************************************************************************/
146 G4UIXm::~G4UIXm()
147 /***************************************************************************/
148 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
149 {
150   G4UImanager* UI = G4UImanager::GetUIpointer();
151   if (UI != NULL) {
152     UI->SetSession(NULL);
153     UI->SetCoutDestination(NULL);
154   }
155   XtDestroyWidget(shell);
156 }
157 /***************************************************************************/
158 G4UIsession* G4UIXm::SessionStart()
159 /***************************************************************************/
160 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
161 {
162   G4Xt* interactorManager = G4Xt::getInstance();
163   Prompt("session");
164   exitSession = false;
165   interactorManager->DisableSecondaryLoop();
166   void* event;
167   while ((event = interactorManager->GetEvent()) != NULL) {
168     interactorManager->DispatchEvent(event);
169     if (exitSession == true) break;
170   }
171   interactorManager->EnableSecondaryLoop();
172   return this;
173 }
174 /***************************************************************************/
175 void G4UIXm::Prompt(const G4String& aPrompt)
176 /***************************************************************************/
177 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
178 {
179   Arg args[1];
180   char* str = (char*)XtNewString(aPrompt.data());
181   XmString cps = XmStringLtoRCreate(str, (char*)XmSTRING_DEFAULT_CHARSET);
182   XtFree(str);
183   XtSetArg(args[0], XmNpromptString, cps);
184   XtSetValues(command, args, 1);
185   XmStringFree(cps);
186 }
187 /***************************************************************************/
188 void G4UIXm::SessionTerminate()
189 /***************************************************************************/
190 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
191 {}
192 /***************************************************************************/
193 void G4UIXm::PauseSessionStart(const G4String& a_state)
194 /***************************************************************************/
195 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
196 {
197   if (a_state == "G4_pause> ") {
198     SecondaryLoop("Pause, type continue to exit this state");
199   }
200 
201   if (a_state == "EndOfEvent") {
202     // Picking with feed back in event data Done here !!!
203     SecondaryLoop("End of event, type continue to exit this state");
204   }
205 }
206 /***************************************************************************/
207 void G4UIXm::SecondaryLoop(const G4String& a_prompt)
208 /***************************************************************************/
209 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
210 {
211   G4Xt* interactorManager = G4Xt::getInstance();
212   Prompt(a_prompt);
213   exitPause = false;
214   void* event;
215   while ((event = interactorManager->GetEvent()) != NULL) {
216     interactorManager->DispatchEvent(event);
217     if (exitPause == true) break;
218   }
219   Prompt("session");
220 }
221 /***************************************************************************/
222 G4int G4UIXm::ReceiveG4debug(const G4String& a_string)
223 /***************************************************************************/
224 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
225 {
226   XmTextAppendString(text, (char*)a_string.data());
227   return 0;
228 } /***************************************************************************/
229 G4int G4UIXm::ReceiveG4cout(const G4String& a_string)
230 /***************************************************************************/
231 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
232 {
233   XmTextAppendString(text, (char*)a_string.data());
234   return 0;
235 }
236 /***************************************************************************/
237 G4int G4UIXm::ReceiveG4cerr(const G4String& a_string)
238 /***************************************************************************/
239 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
240 {
241   XmTextAppendString(text, (char*)a_string.data());
242   return 0;
243 }
244 /***************************************************************************/
245 G4bool G4UIXm::GetHelpChoice(G4int& aInt)
246 /***************************************************************************/
247 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
248 {
249   fHelp = true;
250   // SecondaryLoop :
251   G4Xt* interactorManager = G4Xt::getInstance();
252   Prompt("Help");
253   exitHelp = false;
254   void* event;
255   while ((event = interactorManager->GetEvent()) != NULL) {
256     interactorManager->DispatchEvent(event);
257     if (exitHelp == true) break;
258   }
259   Prompt("session");
260   //
261   if (fHelp == false) return false;
262   aInt = fHelpChoice;
263   fHelp = false;
264   return true;
265 }
266 /***************************************************************************/
267 void G4UIXm::ExitHelp() const
268 /***************************************************************************/
269 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
270 {}
271 /***************************************************************************/
272 void G4UIXm::AddMenu(const char* a_name, const char* a_label)
273 /***************************************************************************/
274 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
275 {
276   if (menuBar == NULL) return;
277   if (a_name == NULL) return;
278   if (a_label == NULL) return;
279   XtManageChild(menuBar);
280   // Pulldown menu :
281   Widget widget;
282   widget = XmCreatePulldownMenu(menuBar, (char*)a_name, NULL, 0);
283   AddInteractor(a_name, (G4Interactor)widget);
284   // Cascade button :
285   Arg args[2];
286   XmString cps = XmStringLtoRCreate((char*)a_label, (char*)XmSTRING_DEFAULT_CHARSET);
287   XtSetArg(args[0], XmNlabelString, cps);
288   XtSetArg(args[1], XmNsubMenuId, widget);
289   widget = XmCreateCascadeButton(menuBar, (char*)a_name, args, 2);
290   XmStringFree(cps);
291   XtManageChild(widget);
292   ExecuteChangeSizeFunction(form);
293 }
294 /***************************************************************************/
295 void G4UIXm::AddButton(const char* a_menu, const char* a_label, const char* a_command)
296 /***************************************************************************/
297 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
298 {
299   if (a_menu == NULL) return;
300   if (a_label == NULL) return;
301   if (a_command == NULL) return;
302   Widget parent = (Widget)GetInteractor(a_menu);
303   if (parent == NULL) return;
304   Widget widget = XmCreatePushButton(parent, (char*)a_label, NULL, 0);
305   XtManageChild(widget);
306   XtAddCallback(widget, XmNactivateCallback, ButtonCallback, (XtPointer)this);
307   commands[widget] = a_command;
308 }
309 /***************************************************************************/
310 G4String G4UIXm::GetCommand(Widget a_widget)
311 /***************************************************************************/
312 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
313 {
314   return commands[a_widget];
315 }
316 /***************************************************************************/
317 /***************************************************************************/
318 /***************************************************************************/
319 void G4UIXm::CommandEnteredCallback(Widget, XtPointer a_tag, XtPointer a_data)
320 /***************************************************************************/
321 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
322 {
323   G4UIXm* This = (G4UIXm*)a_tag;
324 
325   XmString cps = ((XmCommandCallbackStruct*)a_data)->value;
326   char* ss = XmConvertCompoundStringToString(cps, 0);
327   G4String scommand(ss);
328   XtFree(ss);
329 
330   if (This->fHelp == true) {
331     exitHelp = true;
332     This->fHelp = ConvertStringToInt(scommand.data(), This->fHelpChoice);
333   }
334   else {
335     This->ApplyShellCommand(scommand, exitSession, exitPause);
336   }
337 
338   a_tag = NULL;
339 }
340 /***************************************************************************/
341 void G4UIXm::keyHandler(Widget a_widget, XtPointer a_tag, XEvent* a_event, Boolean*)
342 /***************************************************************************/
343 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
344 {
345   KeySym keySym;
346   XLookupString(&(a_event->xkey), NULL, 0, &keySym, NULL);
347   if (keySym != XK_Tab) return;
348   G4UIXm* This = (G4UIXm*)a_tag;
349   char* s = XmTextGetString(a_widget);
350   G4String ss = This->Complete(s);
351   XmTextSetString(a_widget, (char*)ss.data());
352   XtFree(s);
353   XmTextSetInsertionPosition(a_widget, XmTextGetLastPosition(a_widget));
354 }
355 /***************************************************************************/
356 void clearButtonCallback(Widget, XtPointer a_tag, XtPointer)
357 /***************************************************************************/
358 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
359 {
360   static const G4String empty_str = "";
361   XmTextSetString((Widget)a_tag, (char*)empty_str.c_str());
362 }
363 /***************************************************************************/
364 void G4UIXm::ButtonCallback(Widget a_widget, XtPointer a_tag, XtPointer)
365 /***************************************************************************/
366 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
367 {
368   G4UIXm* This = (G4UIXm*)a_tag;
369   if (This->fHelp == true) return;  // Disabled when in help.
370   G4String ss = This->GetCommand(a_widget);
371   This->ApplyShellCommand(ss, exitSession, exitPause);
372 }
373 /***************************************************************************/
374 /***************************************************************************/
375 /***************************************************************************/
376 char* XmConvertCompoundStringToString(XmString a_cps, G4int a_number)
377 /***************************************************************************/
378 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
379 {
380   if (a_cps == NULL) return NULL;
381   char* ss = NULL;
382   XmStringContext context;
383   XmStringInitContext(&context, a_cps);
384   G4int icount = 0;
385   Boolean Done = False;
386   while (Done == False) {
387     char* text = NULL;
388     XmStringCharSet charset = NULL;
389     XmStringDirection direct;
390     Boolean sep;
391     if (XmStringGetNextSegment(context, &text, &charset, &direct, &sep) == True) {
392       XtFree(charset);
393       if (sep == True) Done = True;
394       if (icount == a_number) {
395         ss = text;
396         break;
397       }
398       icount++;
399       XtFree(text);
400     }
401     else
402       Done = True;
403   }
404   XmStringFreeContext(context);
405   return ss;
406 }
407 /***************************************************************************/
408 void XmTextAppendString(Widget This, char* a_string)
409 /***************************************************************************/
410 /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
411 {
412   if (This == NULL) return;
413   if (! XtIsSubclass(This, xmTextWidgetClass)) return;
414   if (a_string == NULL) return;
415   XmTextPosition lastpos = XmTextGetLastPosition(This);
416   XmTextReplace(This, lastpos, lastpos, a_string);
417   XmTextSetInsertionPosition(This, XmTextGetLastPosition(This));
418 }
419 //////////////////////////////////////////////////////////////////////////////
420 G4bool ConvertStringToInt(const char* aString, G4int& aInt)
421 //////////////////////////////////////////////////////////////////////////////
422 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
423 {
424   aInt = 0;
425   if (aString == NULL) return false;
426   char* s;
427   G4long value = strtol(aString, &s, 10);
428   if (s == aString) return false;
429   aInt = (G4int)value;
430   return true;
431 }
432 #include <X11/IntrinsicP.h>
433 //////////////////////////////////////////////////////////////////////////////
434 void ExecuteChangeSizeFunction(Widget aWidget)
435 //////////////////////////////////////////////////////////////////////////////
436 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
437 {
438   if (aWidget == NULL) return;
439   if (aWidget->core.widget_class->core_class.resize == NULL) return;
440   (aWidget->core.widget_class->core_class.resize)(aWidget);
441 }
442