Пример #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();
}
Пример #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();
}
Пример #3
0
void XpatBuildEditDialog()

{
  autbegin();

  XpatBuildDialog( XpatMainWindow, &XpatSearchObjectDialog );

  autend();
}
Пример #4
0
void XvpnResizeUnitGrid()

{
  autbegin();

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

  autend();
}
Пример #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();
}
Пример #6
0
void XgraResizeUnitGrid()

{
  autbegin();

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

  autend();
}
Пример #7
0
void XvpnBuildFileDialog()

{
  autbegin();

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

  autend();
}
Пример #8
0
void XfsmInitializeIcon()

{
  autbegin();

  XfsmSetIcon( XfsmTopLevel, 
                IconBits, IconWidth, IconHeight );

  autend();
}
Пример #9
0
void XschResizeUnitGrid()

{
  autbegin();

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

  autend();
}
Пример #10
0
void XschBuildFileDialog()

{
  autbegin();

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

  autend();
}
Пример #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();
}
Пример #12
0
void XpatPromptEditIdentify()

{
  autbegin();

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

  autend();
}
Пример #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();
}
Пример #14
0
void XvpnInitializeDialog()

{
  autbegin();

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

  autend();
}
Пример #15
0
void XpatInitializeDialog()

{
  autbegin();

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

  autend();
}
Пример #16
0
void XvpnPromptEditConnected()

{
  autbegin();

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

  autend();
}
Пример #17
0
void XvpnBuildViewDialog()

{
  autbegin();

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

  autend();
}
Пример #18
0
void XvpnEnterPresentPanel()

{
  autbegin();

  XvpnEnterPanel( &XvpnHelpPresentPanel );

  XvpnLimitedLoop( XvpnHelpPresentPanel.PANEL );

  XvpnExitPanel( &XvpnHelpPresentPanel );

  autend();
}
Пример #19
0
void XfsmEnterPresentPanel()

{
  autbegin();

  XfsmEnterPanel( &XfsmHelpPresentPanel );

  XfsmLimitedLoop( XfsmHelpPresentPanel.PANEL );

  XfsmExitPanel( &XfsmHelpPresentPanel );

  autend();
}
Пример #20
0
void XgraEnterPresentPanel()

{
  autbegin();

  XgraEnterPanel( &XgraHelpPresentPanel );

  XgraLimitedLoop( XgraHelpPresentPanel.PANEL );

  XgraExitPanel( &XgraHelpPresentPanel );

  autend();
}
Пример #21
0
void XschEnterPresentPanel()

{
  autbegin();

  XschEnterPanel( &XschHelpPresentPanel );

  XschLimitedLoop( XschHelpPresentPanel.PANEL );

  XschExitPanel( &XschHelpPresentPanel );

  autend();
}
Пример #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();
}
Пример #23
0
void XgraInitializeMenu()

{
  autbegin();

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

  XgraBuildMenus( XgraMenuBar, XgraMainMenu );

  XtManageChild( XgraMenuBar );

  autend();
}
Пример #24
0
void XschInitializeMenu()

{
  autbegin();

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

  XschBuildMenus( XschMenuBar, XschMainMenu );

  XtManageChild( XschMenuBar );

  autend();
}
Пример #25
0
void XpatInitializeMenu()

{
  autbegin();

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

  XpatBuildMenus( XpatMenuBar, XpatMainMenu );

  XtManageChild( XpatMenuBar );

  autend();
}
Пример #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();
}
Пример #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();
}
Пример #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();
}
Пример #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();
}
Пример #30
0
void XschDisplayInformations()

{
  char *Message;

  autbegin();

  Message = XschGetInformations();

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

  XschEnterPanel( &XschSetupInformationsPanel );

  XschLimitedLoop( XschSetupInformationsPanel.PANEL );

  XschExitPanel( &XschSetupInformationsPanel );

  autend();
}