windows.c File Reference

#include "x_ptyx.h"
#include "x_data.h"
#include "global.h"
#include "version.h"
#include "x_xbas.icon.X"

Include dependency graph for windows.c:

Go to the source code of this file.

Functions

static void CreateMessageWindow __PARAMS ((Widget parent))
XtermWidget CreateTermWindow (Widget parent)
XtermWidget CreateSubWindows (Widget parent)
static void CreateMessageWindow (Widget parent)
void DefaultMessageWindow ()
void set_scilab_icon ()
XtEventHandler UseMessage (Widget w, Widget child, XClientMessageEvent *e)
void AddAcceptMessage (Widget parent)
void ReAcceptMessage ()
void UpdateFileLabel (char *string)
void UpdateLineLabel (Cardinal line)
void UpdateMessageWindow (char *format, char *arg)

Variables

Widget realToplevel
Widget fileWindow
Widget messageWindow
Widget separator
static Widget fileLabel
static Widget lineLabel
WidgetClass xtermWidgetClass
Atom NewGraphWindowMessageAtom
static Widget WidgetUseMessage


Function Documentation

static void CreateMessageWindow __PARAMS ( (Widget parent)   )  [static]

Unused static void CreateFileLabel __PARAMS((Widget parent)); static void CreateLineLabel __PARAMS((Widget parent)); static void CreateFileWindow __PARAMS((Widget parent));

void AddAcceptMessage ( Widget  parent  ) 

Definition at line 215 of file windows.c.

References UseMessage().

Referenced by CreateSubWindows().

00217 {
00218   WidgetUseMessage=parent ;
00219   XtAddEventHandler(parent,ClientMessage, True, (XtEventHandler) UseMessage,(XtPointer) 0);  
00220 }

Here is the call graph for this function:

Here is the caller graph for this function:

static void CreateMessageWindow ( Widget  parent  )  [static]

static void CreateLineLabel(parent) Widget parent; { Arg args[MAXARGS]; Cardinal n;

n = 0; XtSetArg(args[n], XtNlabel, (XtArgVal) ""); n++; XtSetArg(args[n], XtNborderWidth, (XtArgVal) 0); n++; XtSetArg(args[n], XtNfromHoriz, (XtArgVal) fileLabel); n++; XtSetArg(args[n], XtNhorizDistance, (XtArgVal) 0); n++; lineLabel = XtCreateManagedWidget("lineLabel", labelWidgetClass, parent, args, n); }

Definition at line 116 of file windows.c.

References args, DEFAULT_SCI_VERSION_MESSAGE, formWidgetClass, labelWidgetClass, MAXARGS, messageWindow, n, SCI_VERSION_STRING, and XtNlabel.

Referenced by CreateSubWindows().

00118 {
00119     Arg         args[MAXARGS];
00120     Widget      fm;
00121     Cardinal    n=0;
00122     fm = XtCreateManagedWidget("msWindow",formWidgetClass,
00123                                           parent, args, n);
00124     n = 0;
00125     XtSetArg(args[n], XtNlabel, (XtArgVal) SCI_VERSION_STRING); n++;
00126     XtCreateManagedWidget("logoWindow",labelWidgetClass,
00127                                           fm, args, n);
00128     XtSetArg(args[n], XtNlabel, (XtArgVal) DEFAULT_SCI_VERSION_MESSAGE); n++;
00129     messageWindow = XtCreateManagedWidget("messageWindow",labelWidgetClass,
00130                                           fm, args, n);
00131 }

Here is the caller graph for this function:

XtermWidget CreateSubWindows ( Widget  parent  ) 

Definition at line 150 of file windows.c.

References AddAcceptMessage(), args, CreateCommandPanel(), CreateMessageWindow(), CreateTermWindow(), n, and panedWidgetClass.

Referenced by main_sci().

00151 {
00152   Arg   args[1];
00153   Cardinal n=0;
00154   XtermWidget CreateTermWindow();
00155   Widget        vpane;   /* outer widget containing various subwindows */
00156   vpane = XtCreateManagedWidget("vpane", panedWidgetClass, parent, args, n);
00157   AddAcceptMessage(parent);
00158   CreateMessageWindow(vpane);
00159   CreateCommandPanel(vpane);
00160   return(CreateTermWindow(vpane));
00161 } 

Here is the call graph for this function:

Here is the caller graph for this function:

XtermWidget CreateTermWindow ( Widget  parent  ) 

Definition at line 227 of file windows.c.

References args, MAXARGS, and n.

Referenced by CreateSubWindows().

00228 {
00229   XtermWidget term1;
00230   Arg   args[MAXARGS];
00231   Cardinal      n=0;
00236   term1 = (XtermWidget) XtCreateManagedWidget("Vtsci", xtermWidgetClass, parent, args,n);
00237   return(term1);
00238 }

Here is the caller graph for this function:

void DefaultMessageWindow (  ) 

Definition at line 133 of file windows.c.

References args, DEFAULT_SCI_VERSION_MESSAGE, MAXARGS, messageWindow, n, and XtNlabel.

Referenced by info_handler().

00134 {
00135     Arg         args[MAXARGS];
00136     Cardinal    n=0;
00137     XtSetArg(args[n], XtNlabel,(XtArgVal) DEFAULT_SCI_VERSION_MESSAGE); n++;
00138     XtSetValues(messageWindow, args, n);
00139 }

Here is the caller graph for this function:

void ReAcceptMessage (  ) 

Definition at line 222 of file windows.c.

References UseMessage().

00223 {
00224   XtAddEventHandler(WidgetUseMessage,ClientMessage, True, (XtEventHandler) UseMessage,(XtPointer) 0);  
00225 }

Here is the call graph for this function:

void set_scilab_icon (  ) 

Definition at line 169 of file windows.c.

References realToplevel.

00170 {
00173   XWMHints wm_hints;
00174   Pixmap        sci_icon;
00175   
00176   sci_icon = XCreateBitmapFromData
00177     (XtDisplay(realToplevel),
00178      RootWindow(XtDisplay(realToplevel),
00179                 DefaultScreen(XtDisplay(realToplevel))),
00180      (char *) sci_bits, sci_width, sci_height);
00181   
00182   /*  n = 0;
00183       XtSetArg(args[n], XtNiconPixmap, sci_icon); n++;
00184       XtSetValues(realToplevel, args, n);*/
00185 
00186   wm_hints.icon_pixmap = sci_icon;
00187   wm_hints.flags = IconPixmapHint;
00188   XSetWMHints (XtDisplay(realToplevel), XtWindow(realToplevel), 
00189                      &wm_hints);
00190 }

void UpdateFileLabel ( char *  string  ) 

Definition at line 245 of file windows.c.

References args, MAXARGS, n, and XtNlabel.

00247 {
00248     Arg         args[MAXARGS];
00249     Cardinal    n;
00250     n = 0;
00251     XtSetArg(args[n], XtNlabel, (XtArgVal) string);                     n++;
00252     XtSetValues(fileLabel, args, n);
00253 }

void UpdateLineLabel ( Cardinal  line  ) 

Definition at line 255 of file windows.c.

References args, MAXARGS, n, string, and XtNlabel.

00257 {
00258     Arg         args[MAXARGS];
00259     Cardinal    n;
00260     char        string[10];
00261     n = 0;
00262     if (line > n)
00263         sprintf(string, "%d", line);
00264     else
00265         strcpy(string, "");
00266     XtSetArg(args[n], XtNlabel, (XtArgVal) string);             n++;
00267     XtSetValues(lineLabel, args, n);
00268 }

void UpdateMessageWindow ( char *  format,
char *  arg 
)

Definition at line 270 of file windows.c.

References args, LINESIZ, MAXARGS, messageWindow, n, string, and XtNlabel.

00272 {
00273     char        message[LINESIZ], string[LINESIZ];
00274     Arg         args[MAXARGS];
00275     Cardinal    n;
00276 
00277     strcpy(message, "  ");
00278     sprintf(string, format, arg);
00279     strcat(message, string);
00280     n = 0;
00281     XtSetArg(args[n], XtNlabel, (XtArgVal) message);            n++;
00282     XtSetValues(messageWindow, args, n);
00283 }

XtEventHandler UseMessage ( Widget  w,
Widget  child,
XClientMessageEvent *  e 
)

Definition at line 197 of file windows.c.

Referenced by AddAcceptMessage(), and ReAcceptMessage().

00201 {
00202   if (e->type == ClientMessage 
00203       && e->message_type == NewGraphWindowMessageAtom)
00204       {
00205         /*
00206           fprintf(stderr,"It was a Client Message Of the Good Type \n");
00207           fprintf(stderr,"I Need to Create Window %d",e->data.l[0]);
00208         */
00209       }
00210   return(0);
00211 }

Here is the caller graph for this function:


Variable Documentation

Widget fileLabel [static]

Definition at line 65 of file windows.c.

Widget fileWindow

Definition at line 51 of file windows.c.

Widget lineLabel [static]

Definition at line 65 of file windows.c.

Widget messageWindow

Definition at line 51 of file windows.c.

Referenced by CreateMessageWindow(), DefaultMessageWindow(), and UpdateMessageWindow().

Atom NewGraphWindowMessageAtom

we want Xscilab to accept messages : NewGraphWindowMessageAtom

Definition at line 195 of file windows.c.

Widget realToplevel

Definition at line 274 of file x_main.c.

Referenced by set_scilab_icon().

Widget separator

Definition at line 51 of file windows.c.

Widget WidgetUseMessage [static]

Definition at line 213 of file windows.c.

WidgetClass xtermWidgetClass

Definition at line 505 of file x_charproc.c.


Generated on Sun Mar 4 16:06:19 2007 for Scilab [trunk] by  doxygen 1.5.1