Exemplo n.º 1
0
void XschInitializeGraphicWindow()
 
{
  autbegin();

  XtVaGetValues( XschGraphicWindow,
                 XmNwidth, &XschGraphicDx,
                 XmNheight, &XschGraphicDy,
                 NULL
               );

  XschOldGraphicDx = XschGraphicDx;
  XschOldGraphicDy = XschGraphicDy;

  XschGraphicPixmap =

     XCreatePixmap ( XschGraphicDisplay,
                     RootWindowOfScreen( XtScreen ( XschGraphicWindow ) ),
                     XschGraphicDx,
                     XschGraphicDy,
                     DefaultDepthOfScreen ( XtScreen ( XschGraphicWindow ) )
                   );

  XschClearGraphicWindow( 0, 0, XschGraphicDx, XschGraphicDy );
  XschInitializeUnitGrid();

  XschSetMouseCursor( XschGraphicWindow, XSCH_NORMAL_CURSOR );

  autend();
}
Exemplo n.º 2
0
void XvpnComputeUnitGrid()

{
  float StepX;
  float StepY;

  autbegin();

  StepX = (float)(XvpnGraphicDx) / (float)(XvpnUnitGridDx);
  StepY = (float)(XvpnGraphicDy) / (float)(XvpnUnitGridDy);

  if ( StepX < StepY )
  {
    XvpnUnitGridStep = StepX;
    XvpnUnitGridDy   = 1 + ( XvpnGraphicDy / StepX );
  }
  else
  {
    XvpnUnitGridStep = StepY;
    XvpnUnitGridDx   = 1 + ( XvpnGraphicDx / StepY );
  }

  XvpnPixelGridX = (float)(XvpnUnitGridX) * XvpnUnitGridStep;
  XvpnPixelGridY = (float)(XvpnUnitGridY) * XvpnUnitGridStep;

  autend();
}
Exemplo n.º 3
0
void XpatBuildEditDialog()

{
  autbegin();

  XpatBuildDialog( XpatMainWindow, &XpatSearchObjectDialog );

  autend();
}
Exemplo n.º 4
0
void XvpnResizeUnitGrid()

{
  autbegin();

  XvpnUnitGridDx = 1 + ( XvpnGraphicDx / XvpnUnitGridStep );
  XvpnUnitGridDy = 1 + ( XvpnGraphicDy / XvpnUnitGridStep );

  autend();
}
Exemplo n.º 5
0
void XschPromptToolsHierarchyDown()
{
  autbegin();

  XschDisplayMessage( XSCH_MESSAGE_MODE, "Go down" );
  XschDisplayMessage( XSCH_MESSAGE_INFO, "Select instance" );
  XschDisplayMessage( XSCH_MESSAGE_PROMPT, "Enter select point" );

  autend();
}
Exemplo n.º 6
0
void XgraResizeUnitGrid()

{
  autbegin();

  XgraUnitGridDx = 1 + ( XgraGraphicDx / XgraUnitGridStep );
  XgraUnitGridDy = 1 + ( XgraGraphicDy / XgraUnitGridStep );

  autend();
}
Exemplo n.º 7
0
void XvpnBuildFileDialog()

{
  autbegin();

  XvpnBuildDialog( XvpnMainWindow, &XvpnFileOpenDialog   );
  XvpnBuildDialog( XvpnMainWindow, &XvpnFileQuitDialog   );

  autend();
}
Exemplo n.º 8
0
void XfsmInitializeIcon()

{
  autbegin();

  XfsmSetIcon( XfsmTopLevel, 
                IconBits, IconWidth, IconHeight );

  autend();
}
Exemplo n.º 9
0
void XschResizeUnitGrid()

{
  autbegin();

  XschUnitGridDx = 1 + ( XschGraphicDx / XschUnitGridStep );
  XschUnitGridDy = 1 + ( XschGraphicDy / XschUnitGridStep );

  autend();
}
Exemplo n.º 10
0
void XschBuildFileDialog()

{
  autbegin();

  XschBuildDialog( XschMainWindow, &XschFileOpenDialog   );
  XschBuildDialog( XschMainWindow, &XschFileQuitDialog   );

  autend();
}
Exemplo n.º 11
0
void XgraPromptZoomCenter()

{
  autbegin();

  XgraDisplayMessage( XGRA_MESSAGE_MODE, "Zoom Center" );
  XgraDisplayMessage( XGRA_MESSAGE_INFO, "Select point" );
  XgraDisplayMessage( XGRA_MESSAGE_PROMPT, "Enter center point" );

  autend();
}
Exemplo n.º 12
0
void XpatPromptEditIdentify()

{
  autbegin();

  XpatDisplayMessage( XPAT_MESSAGE_MODE  , "Identify" );
  XpatDisplayMessage( XPAT_MESSAGE_INFO  , "Select object" );
  XpatDisplayMessage( XPAT_MESSAGE_PROMPT, "Enter select point" );

  autend();
}
Exemplo n.º 13
0
void XpatPromptEditDelCursor()

{
  autbegin();

  XpatDisplayMessage( XPAT_MESSAGE_MODE  , "Delete cursor" );
  XpatDisplayMessage( XPAT_MESSAGE_INFO  , "Select cursor" );
  XpatDisplayMessage( XPAT_MESSAGE_PROMPT, "Enter select point" );

  autend();
}
Exemplo n.º 14
0
void XvpnInitializeDialog()

{
  autbegin();

  XvpnBuildFileDialog();
  XvpnBuildEditDialog();
  XvpnBuildViewDialog();

  autend();
}
Exemplo n.º 15
0
void XpatInitializeDialog()

{
  autbegin();

  XpatBuildFileDialog();
  XpatBuildEditDialog();
  XpatBuildViewDialog();

  autend();
}
Exemplo n.º 16
0
void XvpnPromptEditConnected()

{
  autbegin();

  XvpnDisplayMessage( XVPN_MESSAGE_MODE  , "Connected" );
  XvpnDisplayMessage( XVPN_MESSAGE_INFO  , "Select object" );
  XvpnDisplayMessage( XVPN_MESSAGE_PROMPT, "Enter select point" );

  autend();
}
Exemplo n.º 17
0
void XvpnBuildViewDialog()

{
  autbegin();

  XvpnBuildDialog( XvpnMainWindow, &XvpnViewZoomSetDialog  );
  XvpnBuildDialog( XvpnMainWindow, &XvpnViewZoomGotoDialog );
  XvpnBuildDialog( XvpnMainWindow, &XvpnViewMoveSetDialog  );
  XvpnBuildDialog( XvpnMainWindow, &XvpnViewGridXDialog    );
  XvpnBuildDialog( XvpnMainWindow, &XvpnViewGridYDialog    );

  autend();
}
Exemplo n.º 18
0
void XvpnEnterPresentPanel()

{
  autbegin();

  XvpnEnterPanel( &XvpnHelpPresentPanel );

  XvpnLimitedLoop( XvpnHelpPresentPanel.PANEL );

  XvpnExitPanel( &XvpnHelpPresentPanel );

  autend();
}
Exemplo n.º 19
0
void XfsmEnterPresentPanel()

{
  autbegin();

  XfsmEnterPanel( &XfsmHelpPresentPanel );

  XfsmLimitedLoop( XfsmHelpPresentPanel.PANEL );

  XfsmExitPanel( &XfsmHelpPresentPanel );

  autend();
}
Exemplo n.º 20
0
void XgraEnterPresentPanel()

{
  autbegin();

  XgraEnterPanel( &XgraHelpPresentPanel );

  XgraLimitedLoop( XgraHelpPresentPanel.PANEL );

  XgraExitPanel( &XgraHelpPresentPanel );

  autend();
}
Exemplo n.º 21
0
void XschEnterPresentPanel()

{
  autbegin();

  XschEnterPanel( &XschHelpPresentPanel );

  XschLimitedLoop( XschHelpPresentPanel.PANEL );

  XschExitPanel( &XschHelpPresentPanel );

  autend();
}
Exemplo n.º 22
0
void XgraInitializeColors()

{
    XColor   ForgetIt;
    XColor   GetIt;
    Window   Root;
    int      Counter;
    Colormap ColorMap;
    char     Error;
    char    *ColorName;

    autbegin();

    ColorMap  = DefaultColormapOfScreen ( XtScreen ( XgraGraphicWindow ) );
    Error     = False;

    for ( Counter = 0; Counter < XGRA_MAX_COLOR; Counter++ )
    {
        if ( Counter < 5 )
        {
            ColorName = *XgraColorName[ Counter ];
        }
        else
        {
            ColorName = XGRA_LAYER_NAME_TABLE[ Counter - 5 ][ 1 ];
        }

        if ( ColorName != (char *)NULL )
        {
            if ( ! XAllocNamedColor( XgraGraphicDisplay,
                                     ColorMap, ColorName,
                                     &GetIt, &ForgetIt ) )
            {
                fprintf ( stderr, "\nXmx100: Color name '%s' is not in X11 database !\n",
                          ColorName );

                Error = True;
            }

            XgraColor[ Counter ] = GetIt.pixel;
        }
        else
        {
            XgraColor[ Counter ] = XgraColor[ 0 ];
        }
    }

    if ( Error == True ) exit( 1 );

    autend();
}
Exemplo n.º 23
0
void XgraInitializeMenu()

{
  autbegin();

  XgraMenuBar = XmCreateMenuBar( XgraMainWindow,
                                 "XgraMenuBar", NULL, 0 );

  XgraBuildMenus( XgraMenuBar, XgraMainMenu );

  XtManageChild( XgraMenuBar );

  autend();
}
Exemplo n.º 24
0
void XschInitializeMenu()

{
  autbegin();

  XschMenuBar = XmCreateMenuBar( XschMainWindow,
                                 "XschMenuBar", NULL, 0 );

  XschBuildMenus( XschMenuBar, XschMainMenu );

  XtManageChild( XschMenuBar );

  autend();
}
Exemplo n.º 25
0
void XpatInitializeMenu()

{
  autbegin();

  XpatMenuBar = XmCreateMenuBar( XpatMainWindow,
                                 "XpatMenuBar", NULL, 0 );

  XpatBuildMenus( XpatMenuBar, XpatMainMenu );

  XtManageChild( XpatMenuBar );

  autend();
}
Exemplo n.º 26
0
void XfsmInitializeColors()

{
  XColor   ForgetIt;
  XColor   GetIt;
  int      Counter;
  char     Error;
  char    *ColorName;

  autbegin();

  Error = False;

  for ( Counter = 0; Counter < XFSM_MAX_COLOR; Counter++ )
  {
    if ( Counter < 5 )
    {
       ColorName = *XfsmColorName[ Counter ];
    }
    else
    {
      ColorName = XFSM_LAYER_NAME_TABLE[ Counter - 5 ][ 1 ];
    }

    if ( ColorName != (char *)NULL )
    {
      if ( ! XAllocNamedColor( XfsmGraphicDisplay, 
                               XfsmColorMap, ColorName, 
                              &GetIt, &ForgetIt ) ) 
      {
        fprintf ( stderr, "\nXmx: Unable to allocate color '%s' !\n",
                          ColorName );

        Error = True;
      }

      XfsmColor[ Counter ] = GetIt.pixel;
    }
    else 
    {
      XfsmColor[ Counter ] = XfsmColor[ 0 ];
    }
  }

  if ( Error == True ) exit( 1 );

  autend();
}
Exemplo n.º 27
0
void XvpnInitializeUnitGrid()

{
  autbegin();

  XvpnUnitGridX      = XVPN_DEFAULT_GRID_X;
  XvpnUnitGridY      = XVPN_DEFAULT_GRID_Y;
  XvpnUnitGridDx     = XVPN_DEFAULT_GRID_DX;
  XvpnUnitGridDy     = XVPN_DEFAULT_GRID_DY;
  XvpnUnitUserGridDx = 4;
  XvpnUnitUserGridDy = 4;
  XvpnUnitUserGrid   = XVPN_FALSE;

  XvpnComputeUnitGrid();

  autend();
}
Exemplo n.º 28
0
void XgraInitializeUnitGrid()

{
  autbegin();

  XgraUnitGridX      = XGRA_DEFAULT_GRID_X;
  XgraUnitGridY      = XGRA_DEFAULT_GRID_Y;
  XgraUnitGridDx     = XGRA_DEFAULT_GRID_DX;
  XgraUnitGridDy     = XGRA_DEFAULT_GRID_DY;
  XgraUnitUserGridDx = 4;
  XgraUnitUserGridDy = 4;
  XgraUnitUserGrid   = XGRA_FALSE;

  XgraComputeUnitGrid();

  autend();
}
Exemplo n.º 29
0
void XschInitializeUnitGrid()

{
  autbegin();

  XschUnitGridX      = XSCH_DEFAULT_GRID_X;
  XschUnitGridY      = XSCH_DEFAULT_GRID_Y;
  XschUnitGridDx     = XSCH_DEFAULT_GRID_DX;
  XschUnitGridDy     = XSCH_DEFAULT_GRID_DY;
  XschUnitUserGridDx = 4;
  XschUnitUserGridDy = 4;
  XschUnitUserGrid   = XSCH_FALSE;

  XschComputeUnitGrid();

  autend();
}
Exemplo n.º 30
0
void XschDisplayInformations()

{
  char *Message;

  autbegin();

  Message = XschGetInformations();

  XmTextSetString( XschSetupInformationsButton[0].BUTTON, Message );

  XschEnterPanel( &XschSetupInformationsPanel );

  XschLimitedLoop( XschSetupInformationsPanel.PANEL );

  XschExitPanel( &XschSetupInformationsPanel );

  autend();
}