SGraph.h File Reference

#include <X11/keysym.h>
#include <X11/DECkeysym.h>
#include <X11/Xatom.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Shell.h>
#include <X11/Xaw3d/Box.h>
#include <X11/Xaw3d/Command.h>
#include <X11/Xaw3d/Form.h>
#include <X11/Xaw3d/Label.h>
#include <X11/Xaw3d/Cardinals.h>
#include <X11/Xaw3d/Paned.h>
#include <X11/Xaw3d/Grip.h>
#include <X11/Xaw3d/MenuButton.h>
#include <X11/Xaw3d/SimpleMenu.h>
#include <X11/Xaw3d/SmeBSB.h>
#include <X11/Xaw3d/SmeLine.h>
#include <X11/Xaw3d/Viewport.h>
#include <X11/Xaw3d/Panner.h>
#include <X11/IntrinsicP.h>
#include <X11/Xaw3d/ViewportP.h>

Include dependency graph for SGraph.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int IswmDeleteWindow (XEvent *event)
int IsCloseSGWindow (XEvent *event)
void btn_pressed (Widget widget, XEvent *event, String *params, Cardinal *num_params)
void btn_released (Widget widget, XEvent *event, String *params, Cardinal *num_params)
void ctrl_key (Widget widget, XEvent *event, String *params, Cardinal *num_params)
void key_pressed (Widget widget, XEvent *event, String *params, Cardinal *num_params)
void key_released (Widget widget, XEvent *event, String *params, Cardinal *num_params)
void mouse_moved (Widget widget, XEvent *event, String *params, Cardinal *num_params)
void SciViewportMove (struct BCG *ScilabXgc, int x, int y)
void SciViewportGet (struct BCG *ScilabXgc, int *x, int *y)
void SciViewportClipGetSize (struct BCG *ScilabXgc, int *w, int *h)
void SetBar (Widget w, Position top, Dimension length, Dimension total)
void RedrawThumbs (ViewportWidget w)
void GViewportResize (struct BCG *ScilabXgc, int *width, int *height)
void GPopupResize (struct BCG *ScilabXgc, int *width, int *height)
void CreatePopupWindow (integer WinNum, Widget button, struct BCG *ScilabXgc, Pixel *fg, Pixel *bg)
int getNbSubMenus (int winNumber, char *menuName)
void refreshMenus (struct BCG *ScilabGC)
void scig_print (integer number)
void scig_export (integer number)


Function Documentation

void btn_pressed ( Widget  widget,
XEvent *  event,
String *  params,
Cardinal *  num_params 
)

Definition at line 152 of file SGraph.c.

References FALSE, GetEventWindow(), NULL, PushClickQueue(), reset_click_counter(), and TRUE.

00153 {
00154   
00155   /* The following instruction has been commented out not to lose btn_pressed 
00156      emited just before an xclick or xgemouse call
00157     if (!get_wait_click()) return;
00158   */
00159 
00160   if (wait_dclick) {
00161    /* If we are waiting for a double-click, we only handle Button events
00162       in a special fashion.*/
00163       wait_dclick = FALSE;
00164       dclick = TRUE;
00165       lose_up = FALSE;
00166       XtRemoveTimeOut (timerId);
00167       return;
00168  }
00169   timerId = XtAppAddTimeOut(app_con, MultiClickTime,
00170                              (XtTimerCallbackProc) reset_click_counter, (XtPointer) NULL);
00171   wait_dclick = TRUE;
00172   lose_up = FALSE;
00173   dclick = FALSE;
00174 
00175   /*Wait until wait_dclick becomes FALSE 
00176     - either because of two consecutive btn press
00177     - either because of timeout 
00178     - either because of a mouse move  */
00179   do {
00180     if (XtAppPending (app_con))
00181       XtAppProcessEvent (app_con, XtIMAll);
00182   }  while (wait_dclick); 
00183 
00184   /* So here, dclick&lose_up have correct values.*/
00185 
00186   if (dclick ) { /* double click detected [10 11 12]*/
00187      PushClickQueue(GetEventWindow(event),event->xbutton.x,
00188                      event->xbutton.y,
00189                      event->xbutton.button-1+10,0,0);
00190   }
00191   else  {
00192     if  (lose_up) { /* simple click detected [3 4 5]*/
00193       if (params[0][0]=='0')
00194         PushClickQueue(GetEventWindow(event),event->xbutton.x,
00195                        event->xbutton.y,
00196                        event->xbutton.button-1+3,0,0);
00197       else if (params[0][0]=='1') /*shift press*/
00198         PushClickQueue(GetEventWindow(event),event->xbutton.x,
00199                        event->xbutton.y,
00200                        event->xbutton.button-1+3+2000,0,0);
00201       else if (params[0][0]=='2') /*ctrl press*/
00202         PushClickQueue(GetEventWindow(event),event->xbutton.x,
00203                        event->xbutton.y,
00204                        event->xbutton.button-1+3+1000,0,0);
00205 
00206       lose_up = FALSE;
00207       
00208     }
00209     else { /* button pressed detected [0 1 2]*/
00210       if (params[0][0]=='0')
00211         PushClickQueue(GetEventWindow(event),event->xbutton.x,
00212                        event->xbutton.y,
00213                        event->xbutton.button-1,0,0);
00214       else if (params[0][0]=='1') /*shift press*/
00215         PushClickQueue(GetEventWindow(event),event->xbutton.x,
00216                        event->xbutton.y,
00217                        event->xbutton.button-1+2000,0,0);
00218       else if (params[0][0]=='2') /*ctrl press*/
00219         PushClickQueue(GetEventWindow(event),event->xbutton.x,
00220                        event->xbutton.y,
00221                        event->xbutton.button-1+1000,0,0);
00222 
00223     }
00224    
00225  }
00226 
00227 
00228 
00229 }

Here is the call graph for this function:

void btn_released ( Widget  widget,
XEvent *  event,
String *  params,
Cardinal *  num_params 
)

Definition at line 232 of file SGraph.c.

References GetEventWindow(), PushClickQueue(), and TRUE.

00233 {
00234   if (wait_dclick) {
00235     lose_up = TRUE;
00236     return;
00237   }
00238   if (dclick)  return;
00239  /* button released detected [-5 -4 -3]*/
00240   PushClickQueue(GetEventWindow(event),event->xbutton.x,
00241                  event->xbutton.y,
00242                  event->xbutton.button-6,0,1);
00243 }

Here is the call graph for this function:

void CreatePopupWindow ( integer  WinNum,
Widget  button,
struct BCG ScilabXgc,
Pixel fg,
Pixel bg 
)

Definition at line 1260 of file SGraph.c.

References AddNewWin(), args, BCG::CBGWindow, BCG::CWindow, DisplayInit(), dpy, BCG::drawbox, iargs, BCG::popup, ScilabXgc, toplevel, topLevelShellWidgetClass, x_bg_color, x_fg_color, and XtNforeground.

Referenced by initgraphic().

01261 {
01262   Widget toplevel;
01263   Display *dpy;
01264   XColor x_fg_color,x_bg_color;
01265   static XSetWindowAttributes attributes;
01266   unsigned char winname[6];
01267   iargs=0;
01268   XtSetArg(args[iargs], XtNx, 100+20*WinNum % 200);     iargs++;
01269   XtSetArg(args[iargs], XtNy, 100+20*WinNum % 200);     iargs++;
01270   sprintf(popupname,"ScilabGraphic%d",(int)WinNum);
01271   XtSetArg(args[iargs],XtNtitle,popupname);iargs++;
01272   
01273   DisplayInit("",&dpy,&toplevel);
01274   MultiClickTime=XtGetMultiClickTime(dpy);
01275 
01276   /* 
01277   ScilabXgc->popup = XtCreatePopupShell(popupname,
01278                              topLevelShellWidgetClass, button, args, iargs); 
01279                              */
01280   ScilabXgc->popup = XtAppCreateShell("Xscilab",popupname,topLevelShellWidgetClass,dpy,
01281                                       args,iargs);
01282   AddNewWin((int) WinNum,ScilabXgc);
01283   XtPopup(ScilabXgc->popup, XtGrabNone);
01284   SetHints(ScilabXgc->popup);
01285   
01286   sprintf((char *)winname,"BG%d",(int)WinNum);
01287   XChangeProperty(XtDisplay(ScilabXgc->drawbox),
01288                   XtWindow(ScilabXgc->drawbox), XA_WM_NAME, XA_STRING, 8, 
01289                   PropModeReplace, winname, 5);
01290   attributes.backing_store = Always;
01291   attributes.bit_gravity = NorthWestGravity;
01292   XChangeWindowAttributes(XtDisplay((ScilabXgc->drawbox)), 
01293                           XtWindow((ScilabXgc->drawbox)),
01294                           CWBackingStore | CWBitGravity,&attributes);
01295   XSync(XtDisplay(ScilabXgc->popup),0);
01296   ScilabXgc->CWindow=XtWindow(ScilabXgc->drawbox);
01297   ScilabXgc->CBGWindow=XtWindow(ScilabXgc->popup);
01298   XtOverrideTranslations(ScilabXgc->popup, XtParseTranslationTable(sg_trans));
01299   /*  Getting the values of foreground and background */
01300   XtSetArg(args[0],XtNforeground, &x_fg_color.pixel);
01301   XtSetArg(args[1],XtNbackground, &x_bg_color.pixel);
01302   XtGetValues(ScilabXgc->drawbox,args,2);
01303   *fg = x_fg_color.pixel;
01304   *bg = x_bg_color.pixel;
01305 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ctrl_key ( Widget  widget,
XEvent *  event,
String *  params,
Cardinal *  num_params 
)

Definition at line 246 of file SGraph.c.

References buf, compose_status, GetEventWindow(), NULL, and PushClickQueue().

00247 {
00248   char buf[10];
00249   int ten=10;
00250   KeySym keysym;
00251   XComposeStatus compose_status = {NULL, 0};
00252   XLookupString((XKeyEvent *)&(event->xkey), buf, 
00253                 ten, &keysym,&compose_status);
00254   /* <Ctrl> key  detected return  )keysym+1000 */
00255   PushClickQueue(GetEventWindow(event),event->xkey.x,
00256                  event->xkey.y,(int)keysym+1000,0,0);
00257 }

Here is the call graph for this function:

int getNbSubMenus ( int  winNumber,
char *  menuName 
)

Definition at line 1791 of file SGraph.c.

References args, FALSE, GetChilds(), iargs, NULL, and XtNmenuName.

01792 {
01793   int        nbMenus        ;
01794   WidgetList subMenus       ;
01795   Widget     menu           ;
01796   Widget     subMenu        ;
01797   int        menuId         ;
01798   int        nbSubMenus = 0 ;
01799   String     mname      = NULL ;
01800 
01801   if ( GetChilds( winNumber ,
01802                   &nbMenus   ,
01803                   &subMenus ,
01804                   &menu     ,
01805                   menuName  ,
01806                   &menuId    )  == FALSE )
01807   { 
01808     return 0 ;
01809   }
01810   /* a submenu is specified by its position 
01811    * in the menu item list  (*ne) 
01812    */
01813   iargs=0;
01814   XtSetArg(args[iargs], XtNmenuName, &mname);
01815   iargs++;
01816   XtGetValues(subMenus[menuId], args, iargs);
01817   
01818   if ( mname == NULL )
01819   {
01820     return 0 ;
01821   }
01822   
01823   subMenu = XtNameToWidget(subMenus[menuId],mname) ;
01824   iargs = 0 ;
01825   XtSetArg(args[iargs], XtNnumChildren, &nbSubMenus);
01826   iargs++;
01827   XtGetValues( subMenu , args, iargs);
01828   
01829   return nbSubMenus ;
01830 }

Here is the call graph for this function:

void GPopupResize ( struct BCG ScilabXgc,
int width,
int height 
)

used when we resize the popup at scilab level

Definition at line 154 of file wgraph.c.

References args, CPixmapResize1(), BCG::CWindow, FALSE, iargs, Max, NULL, BCG::popup, SB_HORZ, SB_VERT, sciGetScrollInfo(), sciGetwresize(), ScilabXgc, sciSetScrollInfo(), TRUE, WINMINH, WINMINW, x, and y.

00155 {
00156   RECT rect, rect1;
00157   int xof, yof;
00158   SCROLLINFO vertsi;
00159   SCROLLINFO horzsi;
00160   int *x = width; /* F.Leray 01.07.04 copy the setwindowdim function philosohpy (see periwin.c)*/
00161   int *y = height;
00162 
00163  if ( (ScilabXgc->CWindow != NULL) && (ScilabXgc->hWndParent != NULL) )
00164   {
00165     /* initialisation des variables SCROLLINFO*/
00166     sciGetScrollInfo(ScilabXgc, SB_VERT, &vertsi);
00167     sciGetScrollInfo(ScilabXgc, SB_HORZ, &horzsi);
00168     
00169     ScilabXgc->CWindowWidth = Max((int) *x,50);
00170     ScilabXgc->CWindowHeight =Max((int) *y,50);
00171     if ( sciGetwresize() == 1 ) {
00172       ScilabXgc->CWindowWidthView  = ScilabXgc->CWindowWidth;
00173       ScilabXgc->CWindowHeightView = ScilabXgc->CWindowHeight;
00174       vertsi.nPos   = 0;
00175       horzsi.nPos   = 0;
00176     }
00177 
00178     if ( ScilabXgc->CWindowWidthView > ScilabXgc->CWindowWidth)
00179       ScilabXgc->CWindowWidthView = ScilabXgc->CWindowWidth;
00180 
00181     if (ScilabXgc->CWindowHeightView > ScilabXgc->CWindowHeight)
00182       ScilabXgc->CWindowHeightView = ScilabXgc->CWindowHeight;
00183     CPixmapResize1();
00184 
00185     GetWindowRect (ScilabXgc->hWndParent, &rect) ;
00186     GetWindowRect (ScilabXgc->CWindow, &rect1) ;
00187     xof = (rect.right-rect.left)- (rect1.right - rect1.left);
00188     yof = (rect.bottom-rect.top)- (rect1.bottom -rect1.top );
00189     if (sciGetwresize () == 0)
00190       {
00191         SetWindowPos (ScilabXgc->hWndParent, HWND_TOP, 0, 0,
00192                       ScilabXgc->CWindowWidthView + xof +
00193                       GetSystemMetrics (SM_CXVSCROLL),
00194                       ScilabXgc->CWindowHeightView + yof +
00195                       GetSystemMetrics (SM_CYHSCROLL),
00196                       SWP_NOMOVE | SWP_NOZORDER);
00197       }
00198     else
00199       {
00200         SetWindowPos(ScilabXgc->hWndParent,HWND_TOP,0,0,
00201                      ScilabXgc->CWindowWidthView  + xof,
00202                      ScilabXgc->CWindowHeightView + yof,
00203                      SWP_NOMOVE | SWP_NOZORDER );
00204       }
00205     vertsi.nMax   = ScilabXgc->CWindowHeight;
00206     vertsi.nPage  = ScilabXgc->CWindowHeightView;
00207     horzsi.nMax   = ScilabXgc->CWindowWidth;
00208     horzsi.nPage  = ScilabXgc->CWindowWidthView;  
00209     sciSetScrollInfo(ScilabXgc,SB_VERT, &(vertsi), TRUE);
00210     sciSetScrollInfo(ScilabXgc,SB_HORZ, &(horzsi), TRUE);
00211     if ( sciGetwresize() == 0 ) 
00212       {
00213         /* need to force a rdraw in that case */
00214         if ( ScilabXgc->horzsi.nPos + ScilabXgc->CWindowWidthView < 
00215              ScilabXgc->CWindowWidth 
00216              &&  ScilabXgc->vertsi.nPos + ScilabXgc->CWindowHeightView < 
00217              ScilabXgc->CWindowHeight) 
00218           InvalidateRect(ScilabXgc->CWindow,NULL,FALSE);
00219           }
00220   }
00221  
00222 }

Here is the call graph for this function:

void GViewportResize ( struct BCG ScilabXgc,
int width,
int height 
)

Definition at line 697 of file SGraph.c.

References args, BCG::Cdrawable, BCG::CurResizeStatus, BCG::drawbox, Height, iargs, Max, BCG::Panner, BCG::popup, RedrawThumbs(), sci_pixmap_resize(), ScilabXgc, BCG::Viewport, w, Width, WINMINH, WINMINW, x, XtNcanvasHeight, XtNcanvasWidth, XtNsliderHeight, XtNsliderWidth, XtNsliderX, XtNsliderY, and y.

Referenced by xset_windowdim().

00698 {
00699   int Width = Max(*width,  WINMINW);
00700   int Height= Max(*height, WINMINH);
00701   Position x,y;
00702   Dimension cwidth,cheight,clwidth,clheight,wv,hv;
00703   ViewportWidget w = (  ViewportWidget ) ScilabXgc->Viewport;
00704   register Widget clip = w->viewport.clip;
00705   register Widget child = w->viewport.child;
00706 
00707   if ( ScilabXgc->CurResizeStatus == 0) 
00708     {
00710       XtResizeWidget(ScilabXgc->drawbox ,Width,Height,0);
00712       if (ScilabXgc->Cdrawable != (Drawable) 0 ) /* ScilabXgc->CWindow ) */
00713         {
00714           sci_pixmap_resize(ScilabXgc,Width,Height);
00715         }
00716       /*
00717        * Resize the viewport child which contains the graphic widget 
00718        * we don't want the viewport child to be smaller than the 
00719        * clip region 
00720        */
00721       wv = Max(Width,clip->core.width);
00722       hv = Max(Height,clip->core.height);
00723       XtResizeWidget(child,wv,hv,0);
00724       RedrawThumbs(w);
00725       
00728       iargs = 0 ;
00729       XtSetArg (args[iargs], XtNx, &x); iargs++;
00730       XtSetArg (args[iargs], XtNy, &y); iargs++;
00731       XtSetArg (args[iargs], XtNwidth, &cwidth ); iargs++;
00732       XtSetArg (args[iargs], XtNheight, &cheight); iargs++;
00733       XtGetValues (child, args, iargs);
00735       iargs = 0 ;
00736       XtSetArg (args[iargs], XtNwidth, &clwidth ); iargs++;
00737       XtSetArg (args[iargs], XtNheight, &clheight); iargs++;
00738       XtGetValues (clip, args, iargs);
00741       iargs =0;
00742       XtSetArg (args[iargs], XtNsliderX, -x); iargs++;
00743       XtSetArg (args[iargs], XtNsliderY, -y); iargs++;
00744       XtSetArg (args[iargs], XtNsliderWidth, clwidth ); iargs++;
00745       XtSetArg (args[iargs], XtNsliderHeight, clheight); iargs++;
00746       XtSetArg (args[iargs], XtNcanvasWidth,  cwidth); iargs++;
00747       XtSetArg (args[iargs], XtNcanvasHeight,  cheight); iargs++;
00750       XtSetValues (ScilabXgc->Panner, args, iargs);
00751     }
00752   else
00753     {
00754       /* 
00755        * in order to resize the drawbox, we must resize the 
00756        * popup window.
00757        */
00758       iargs =0;
00759       XtSetArg (args[iargs], XtNwidth, &clwidth ); iargs++;
00760       XtSetArg (args[iargs], XtNheight, &clheight); iargs++;
00761       XtGetValues (ScilabXgc->popup, args, iargs);
00762       iargs =0;
00763       XtSetArg (args[iargs], XtNwidth, &cwidth ); iargs++;
00764       XtSetArg (args[iargs], XtNheight, &cheight); iargs++;
00765       XtGetValues (ScilabXgc->drawbox, args, iargs);
00766       /* we add to Width and Height the expected offset 
00767        * the drawbox can be bigger than the popup if 
00768        * we are comming back from a ScilabXgc->CurResizeStatus==0 state 
00769        */
00770       clwidth = Width  + Max(0,(int)clwidth - (int)cwidth);
00771       clheight= Height + Max(0,(int)clheight - (int)cheight);
00772       iargs = 0;
00773       XtSetArg (args[iargs], XtNwidth, clwidth ); iargs++;
00774       XtSetArg (args[iargs], XtNheight,clheight); iargs++;
00775       XtSetValues (ScilabXgc->popup, args, iargs);
00777       if (ScilabXgc->Cdrawable != (Drawable) 0 ) /* ScilabXgc->CWindow ) */
00778         {
00780           iargs =0;
00781           XtSetArg (args[iargs], XtNwidth, &cwidth ); iargs++;
00782           XtSetArg (args[iargs], XtNheight, &cheight); iargs++;
00783           XtGetValues (ScilabXgc->drawbox, args, iargs);
00784           sci_pixmap_resize(ScilabXgc,cwidth,cheight); 
00785           /* scig_resize(ScilabXgc->CurWindow);  */
00786         }
00787     }
00788 }

Here is the call graph for this function:

Here is the caller graph for this function:

int IsCloseSGWindow ( XEvent *  event  ) 

if true the window number is returnde

Definition at line 126 of file SGraph.c.

00127 {
00128   if ( event->type == ClientMessage &&
00129        ((XClientMessageEvent *)event)->message_type == Close_SG_Window_Activated )
00130     return event->xclient.data.l[0];
00131   else
00132     return -1;
00133 }

int IswmDeleteWindow ( XEvent *  event  ) 

to check that an event is of type wmDeleteWindow

Definition at line 117 of file SGraph.c.

References int.

00118 {
00119   return event->type == ClientMessage &&
00120     event->xclient.data.l[0] == (int)wmDeleteWindow ;
00121 }

void key_pressed ( Widget  widget,
XEvent *  event,
String *  params,
Cardinal *  num_params 
)

Definition at line 260 of file SGraph.c.

References buf, compose_status, GetEventWindow(), NULL, and PushClickQueue().

00261 {
00262   char buf[10];
00263   int ten=10;
00264   KeySym keysym;
00265   XComposeStatus compose_status = {NULL, 0};
00266   XLookupString((XKeyEvent *)&(event->xkey), buf, 
00267                 ten, &keysym,&compose_status);
00268   if ((int)keysym < XK_Shift_L ||(int)keysym ==XK_Delete ){
00269     /* regular key pressed detected. return  keysym */
00270     PushClickQueue(GetEventWindow(event),event->xkey.x,
00271                    event->xkey.y,(int)keysym,0,0);
00272   }
00273 }

Here is the call graph for this function:

void key_released ( Widget  widget,
XEvent *  event,
String *  params,
Cardinal *  num_params 
)

Definition at line 275 of file SGraph.c.

References buf, compose_status, GetEventWindow(), NULL, and PushClickQueue().

00276 {
00277   char buf[10];
00278   int ten=10;
00279   KeySym keysym;
00280   XComposeStatus compose_status = {NULL, 0};
00281   XLookupString((XKeyEvent *)&(event->xkey), buf, 
00282                 ten, &keysym,&compose_status);
00283   if ((int)keysym <65000) {
00284     /* regular key released detected. return  -keysym */
00285     PushClickQueue(GetEventWindow(event),event->xkey.x,
00286                    event->xkey.y,-(int)keysym,0,1);
00287   }
00288 }

Here is the call graph for this function:

void mouse_moved ( Widget  widget,
XEvent *  event,
String *  params,
Cardinal *  num_params 
)

Definition at line 290 of file SGraph.c.

References FALSE, GetEventWindow(), and PushClickQueue().

00291 {
00292   /*ignore_events(widget,&event2, ExposureMask) ;*/
00293   if (wait_dclick) { /*move during a double click detection*/
00294     wait_dclick=FALSE;
00295     XtRemoveTimeOut (timerId);
00296     return;
00297   }
00298   PushClickQueue(GetEventWindow(event),event->xbutton.x,
00299                  event->xbutton.y,
00300                  -1,1,0);
00301 }

Here is the call graph for this function:

void RedrawThumbs ( ViewportWidget  w  ) 

Definition at line 655 of file SGraph.c.

References SetBar(), and w.

00656 {
00657   register Widget child = w->viewport.child;
00658   register Widget clip = w->viewport.clip;
00659 
00660   if (w->viewport.horiz_bar)
00661     SetBar( w->viewport.horiz_bar, -(child->core.x),
00662            clip->core.width, child->core.width );
00663 
00664   if (w->viewport.vert_bar)
00665     SetBar( w->viewport.vert_bar, -(child->core.y),
00666            clip->core.height, child->core.height );
00667 }

Here is the call graph for this function:

void refreshMenus ( struct BCG ScilabGC  ) 

Definition at line 1833 of file SGraph.c.

Referenced by initgraphic().

01833 {}

Here is the caller graph for this function:

void scig_export ( integer  number  ) 

Definition at line 926 of file wgmenu.c.

References NULL, SavePs(), and scig_command_scilabgc().

00927 {
00928   scig_command_scilabgc (number, SavePs);
00929 }

Here is the call graph for this function:

void scig_print ( integer  number  ) 

Definition at line 921 of file wgmenu.c.

References NULL, Print(), PrintPs(), and scig_command_scilabgc().

00922 {
00923   scig_command_scilabgc (number, PrintPs);
00924 }

Here is the call graph for this function:

void SciViewportClipGetSize ( struct BCG ScilabXgc,
int w,
int h 
)

Definition at line 513 of file SGraph.c.

References _ViewportPart::clip, NULL, ScilabXgc, _ViewportRec::viewport, and BCG::Viewport.

Referenced by xset_wresize().

00514 {
00515   if ( ScilabXgc != NULL) 
00516     {
00517       ViewportWidget widg = (  ViewportWidget ) ScilabXgc->Viewport;
00518       register Widget clip = widg->viewport.clip;
00519       *w = clip->core.width;
00520       *h = clip->core.height;
00521     }
00522 }

Here is the caller graph for this function:

void SciViewportGet ( struct BCG ScilabXgc,
int x,
int y 
)

SciViewportGet : used to get panner position through scilab command.

: struct BCG *ScilabGC : structure associated to a Scilab Graphic window int x,y : the x,y point of the graphic window to be moved at the up-left position of the viewport

: NONE

Author:
: Matthieu PHILIPPE
Date:
: Dec 1999

Definition at line 133 of file wgraph.c.

References args, dx, dy, n, NULL, BCG::Panner, ScilabXgc, XtNsliderX, and XtNsliderY.

00134 {
00135   if (ScilabXgc != NULL)
00136     {
00137       *x = ScilabXgc->horzsi.nPos;
00138       *y = ScilabXgc->vertsi.nPos;
00139     }
00140   else
00141     {
00142       *x = 0;
00143       *y = 0;
00144     }
00145 }

void SciViewportMove ( struct BCG ScilabGC,
int  x,
int  y 
)

SciViewportMove : used to move the panner and the viewport interactively through scilab command.

: struct BCG *ScilabGC : structure associated to a Scilab Graphic window int x,y : the x,y point of the graphic window to be moved at the up-left position of the viewport

: NONE

Author:
: Matthieu PHILIPPE
Date:
: Dec 1999

Definition at line 99 of file wgraph.c.

References args, FALSE, max, min, MoveChild(), n, NULL, BCG::Panner, SB_HORZ, SB_VERT, sciGetScrollInfo(), ScilabXgc, sciSetScrollInfo(), TRUE, BCG::Viewport, XtNsliderX, and XtNsliderY.

00100 {
00101   SCROLLINFO vertsi;
00102   SCROLLINFO horzsi;
00103 
00104   if (ScilabGC != NULL)
00105     {
00106       sciGetScrollInfo (ScilabGC, SB_VERT, &vertsi);
00107       sciGetScrollInfo (ScilabGC, SB_HORZ, &horzsi);
00108       /* MAJ D.ABDEMOUCHE*/
00109       if (ScilabGC->CurResizeStatus == 0)
00110         {
00111           horzsi.nPos = max (horzsi.nMin, min (horzsi.nMax, x));
00112           sciSetScrollInfo (ScilabGC, SB_HORZ, &horzsi, TRUE);
00113           vertsi.nPos = min (vertsi.nMax, max (vertsi.nMin, y));
00114           sciSetScrollInfo (ScilabGC, SB_VERT, &vertsi, TRUE);
00115           InvalidateRect (ScilabGC->CWindow, (LPRECT) NULL, FALSE);
00116         }
00117     }
00118 }

Here is the call graph for this function:

void SetBar ( Widget  w,
Position  top,
Dimension  length,
Dimension  total 
)

Definition at line 647 of file SGraph.c.

References XawScrollbarSetThumb().

00648 {
00649   XawScrollbarSetThumb(w, (float) top / (float) total, 
00650                        (float) length / (float) total );
00651 }

Here is the call graph for this function:


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