Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

# G4UIXm.cc File Reference

Go to the source code of this file.

## Functions
void | XmTextAppendString (Widget, char *)
void | clearButtonCallback (Widget, XtPointer, XtPointer)
char * | XmConvertCompoundStringToString (XmString, int)
G4bool | ConvertStringToInt (const char *, int &)
void | ExecuteChangeSizeFunction (Widget)
## Variables
G4bool | exitSession = true
G4bool | exitPause = true
G4bool | exitHelp = true

## Function Documentation

void clearButtonCallback | ( | Widget | ,
|  | XtPointer | a_tag,
|  | XtPointer |
| ) | `[static]`

| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Definition at line 405 of file G4UIXm.cc. Referenced by G4UIXm::G4UIXm().
    00412 {
    00413   XmTextSetString((Widget)a_tag,(char*)"");
    00414 }

G4bool ConvertStringToInt | ( | const char * | aString,
|  | int & | aInt
| ) | `[static]`

| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// Definition at line 483 of file G4UIXm.cc. Referenced by G4UIXaw::Callback(), G4UIXm::commandEnteredCallback(), and G4UIWin32::EditWindowProc().
    00489 {
    00490   aInt = 0;
    00491   if(aString==NULL) return false;
    00492   char* s;
    00493   long value = strtol(aString,&s,10);
    00494   if(s==aString) return false;
    00495   aInt = value;
    00496   return true;
    00497 }

void ExecuteChangeSizeFunction | ( | Widget | aWidget | ) | `[static]`

| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// Definition at line 500 of file G4UIXm.cc. Referenced by G4UIXm::AddMenu().
    00505 {
    00506   if(aWidget==NULL) return;
    00507   if(aWidget->core.widget_class->core_class.resize==NULL) return;
    00508   (aWidget->core.widget_class->core_class.resize)(aWidget);
    00509 }

char * XmConvertCompoundStringToString | ( | XmString | a_cps,
|  | int | a_number
| ) | `[static]`

| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Definition at line 433 of file G4UIXm.cc. Referenced by G4UIXm::commandEnteredCallback().
    00439 {
    00440   if(a_cps==NULL) return NULL;
    00441   char* ss = NULL;
    00442   XmStringContext context;
    00443   XmStringInitContext(&context,a_cps);
    00444   int icount = 0;
    00445   Boolean Done = False;
    00446   while(Done==False) {
    00447     char* text = NULL;
    00448     XmStringCharSet charset = NULL;
    00449     XmStringDirection direct;
    00450     Boolean sep;
    00451     if(XmStringGetNextSegment(context,&text,&charset,&direct,&sep)==True) {
    00452       XtFree(charset);
    00453       if(sep==True) Done = True;
    00454       if(icount==a_number) {
    00455         ss = text;
    00456         break;
    00457       }
    00458       icount++;
    00459       XtFree(text);
    00460     }
    00461     else
    00462       Done = True;
    00463   }
    00464   XmStringFreeContext(context);
    00465   return ss;
    00466 }

void XmTextAppendString | ( | Widget | This,
|  | char * | a_string
| ) | `[static]`

| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Definition at line 468 of file G4UIXm.cc. Referenced by G4UIXm::ReceiveG4cerr(), and G4UIXm::ReceiveG4cout().
    00474 {
    00475   if(This==NULL) return;
    00476   if(!XtIsSubclass(This,xmTextWidgetClass)) return;
    00477   if(a_string==NULL) return;
    00478   XmTextPosition  lastpos = XmTextGetLastPosition(This);
    00479   XmTextReplace(This,lastpos,lastpos,a_string);
    00480   XmTextSetInsertionPosition(This,XmTextGetLastPosition(This));
    00481 }

## Variable Documentation

G4bool exitHelp = true`[static]`

| Definition at line 72 of file G4UIXm.cc. Referenced by G4UIXm::commandEnteredCallback(), and G4UIXm::GetHelpChoice().

G4bool exitPause = true`[static]`

| Definition at line 71 of file G4UIXm.cc. Referenced by G4UIXm::ButtonCallback(), G4UIXm::commandEnteredCallback(), and G4UIXm::SecondaryLoop().

G4bool exitSession = true`[static]`

| Definition at line 70 of file G4UIXm.cc. Referenced by G4UIXm::ButtonCallback(), G4UIXm::commandEnteredCallback(), and G4UIXm::SessionStart().