Graphic Functions

Parent Previous Next

Graphic Functions

All Graphics Documents have the following functions:


1.   .OpenGraphic (with one argument): This function will open the graphic document configured in the parameter.


.     String name: A String parameter containing the name of the graphic document that will be opened.


Example: In the Graphic1 document the user wants to open the Graphic2 document. In the event of a button, for example, the user will have to configure the following script: Window.OpenGraphic("Graphic2");



2.   .OpenGraphic (with two arguments): This function will open the graphic document configured in the parameter and the new graphic opened will also receive a reference of a tag passed in the parameter.


.     String name: A String parameter containing the name of the graphic document that will be opened.


.     String tag: A String parameter containing the name of the tag that it will be referenced.


Example: In the Graphic1 document the user wants to open the Graphic2 document and send a reference of the tag "Tags". In the event of a button, for example, the user will have to configure the following script: Window.OpenGraphic("Graphic2", "TagControl1");



3.   .Close(): Close the current graphic document.


Example: To close the current document, the user will have to configure the following script: Window.Close();

  

 

Note: If you close an ancestral graphic, all the child graphics will be closed too.


 

Note: To open and close graphics you can also use the SVGraphics Functions.



4.   .Minimize(): Minimize the current graphic document.


Example: To minimize the current document, the user will have to configure the following script: Window.Minimize();

  

 

Note: If you minimize an ancestral graphic, all the child graphics will be minimized too.



5.   .Maximize(): Maximize the current graphic document.


Example: To maximize the current document, the user will have to configure the following script: Window.Maximize();



6.   .Restore(): Restore the current graphic document window.


Example: To restore the current document, the user will have to configure the following script:Window.Restore();



7.   .ShowWindow(): Show the window and guarantee that it will open above all other windows, even if the user has focus on some other application or window.


Example: To show the window above all other windows, the user will have to configure the following script: Window.ShowWindow();



8.   .Print (with one argument): This function will print the graphic document.


.     String title: A String parameter containing the title of the file that will be printed.


Example: In the Graphic1 document the user wants to print the Window. In the event of a button, for example, the user will have to configure the following script: Window.Print("WindowPrint");




All Graphics Documents have the following attributes:


1.   .Owner: This function allows the user to get a screen tag from its ancestor.


Example: The Graphic1 document has the screen tag "test". The child graphic can store the value of "test" in a child's screen tag "var" using the function ".Owner". In the child graphic document the user can get the value of "test" screen tag using: 


var = Window.Owner["test"];



2.   double Width {get; set;}: Gets or sets the width of the application window in pixels.


Example: To set the width of a window to 300 pixels, the user will have to configure the following script: Window.Width = 300;



3.   double Height {get; set;}: Gets or sets the height of the application window in pixels.


Example: To get the height of a window and store it into a variable "WinHeight", the user will have to configure the following script: WinHeight = Window.Height;



4.   double Left {get; set;}: Gets or sets the position of the window's left edge, in relation to the desktop.


Example: To set the left edge of the window at 50 pixels, the user will have to configure the following script: Window.Left = 50;



5.   double Top {get; set;}: Gets or sets the position of the window's top edge, in relation to the desktop.


Example: To get the position of the top edge of a window, and store it in a variable "TopWin", the user will have to configure the following script: TopWin = Window.Top.


6.   Int Title {get; set;}: Gets or sets the Title of the Graphic.


Example: To get the Title of a window, and store it in a variable "TitleWin", the user will have to configure the following script: TitleWin = Window.Title.


7.   Bool IsRunningWeb {get;}: Gets if the Graphic is runing on Web or Runtime.


Example: To get if the Graphic is on Web or Runtime, and store it in a variable "BoolIsWeb", the user will have to configure the following script:

@BoolWeb = IsRunningWeb;


If the Graphic is running on RunTime "BoolWeb" will be False

If the Graphic is running on Web "BoolWeb" will be True