Logo

GNUCOBOL (già OpenCobol) Italian Group

Nuova versione settembre 2019

Change language

How does it work.

There is an idea behind guicobol. use the cobol itself to manage an advanced gui. No superstructures just cobol and advanced widgets. The syntax object in my opinion is functional to this. Gnucobol does not yet support the "invoke" understood as a real statement, therefore GuiCOBOL takes advantage of this lack by integrating the runtime construction of a gui with the invokes. So one instruction like invoke super "addform" returning self returns an object that specifically in accordance with the rules of oop is the instance of the form in execution (self).The other instruction to access the properties of objects is the classic "move" where the property itself is referenced through quotes then one move "this is the window" to "caption" of self inserts the string "this is the window" as the value of the "caption" property of the window object on the current form. Simple and intuitive.

depending on the direction of the move

you can do a set statement with  move value to "property" of widget

or get with  move "property" of widget to value

The gui cobol preprocessor does the "dirty" work ...behind the scenes an instruction becomes

move "yellow" to "color" of self.

becomes (inline code)

* move "yellow" to "color" of self.
call static "AG_SetStyle" using by value agar-Form by content "color"
by content '#FFFF00'
end-call

likewise

move "property" of object to value

move "text" OF atext to yourbuffer.

becomes.

*
* move "text" OF atext to yourbuffer.
*
move atext to agar-widget
move "get-text" to agar-function
call agar-cobol
move agar-text to yourbuffer .
As far as invokes are concerned, the preprocessor carries out as a formal check that the number of parameters indicated in the row are the minimum and maximum ones possibly present in the relative header of the declaration in guicobol.Inf. and from the same file derives the structure that it will have to insert in the generated code. So if you want to integrate the pre-processor just insert the skeleton of the new instruction and call the agar library directly in the guicobol.inf file which contains the logic of these declarations

invoke self "show"

in the generated .gui file becomes

*
* invoke self "show"
*
move agar-Form to agar-widget
move "set-visible" to agar-function
call agar-cobol

and in the agarcob source code you have the set-visible perform invoked

set-visible.
perform get-class thru ex-get-class. evaluate agar-class
when "form"
call "AG_WindowShow"
using by value agar-widget returning omitted
when other call "AG_WidgetShow"
using by value agar-widget returning omitted.
ex-set-visible.
exit.
get-class.
call static "AG_ObjectGetClassName"
using by value agar-object
by value 0
returning agar-dummy
set address of agar-string TO agar-dummy.
Evaluate function upper-case( agar-string(4:3)) when "WIN" MOVE "form" to agar-class
when "BOX" MOVE "box" to agar-class
when "LAB" MOVE "label" to agar-class
when "TEX" MOVE "text" to agar-class
when "RAD" MOVE "radio" to agar-class
when "CHE" MOVE "check" to agar-class
when "COM" MOVE "combo" to agar-class
when "BUT" MOVE "button" to agar-class
when other
move
agar-string(4:3) to agar-class
display "new class -->" agar-class upon syserr
end-evaluate. ex-get-class.
exit.

Take care at

At the moment the code generator expects to find all the instruction on a single line even if this exceeds the conventions of the standard Cobol margins. However, it is necessary to note that if a very long constant is used when it is repositioned by the preprocessor in the transformation of the code, it will probably be necessary to make a subsequent modification on the source generated once the process has been successfully completed. Guicobol simply creates a new file with the .gui extension which can be compiled in a conventional way with the gnucobol compiler, indicating any options if necessary and possibly passing it to the animator (renaming it .in gui.cbl) if necessary. All the original instructions of the cobol program are reported in the generated file as comments and under all the generated instructions. There are also a series of additional elements in working storage that the preprocessor inserts to report the values ​​of the objects that it will use internally, the standard procedures connected to the close form (if you do not indicate a precise one) and the whole structure of the methods that are all the effects of the complete cobol programs. For the events to reduce the code and improve the readability when they are created in the original code they are only identified by a "method-id" header. Some of these procedures generated by the preprocessor are inline code since the execution of the same through the agarcob library it would be more expensive in terms of accesses and number of lines of code executed In these cases, be careful because the switch to activate the debugging mode present in the guicobol, if activated, affects only the control of the code inserted in the agarcob library. (export GuiCOBOLdebug = enable).

Powercobol

Powercobol (from Fujitsu ltd) and this Open Source project have some similarities and others observed different. In general, the approach to objects follows the rules of Powercobol. The most important difference of all is that the objects on Powercobol must be instantiated during the design phase (and Powercobol has a splendid WYSIWYG editor) and the development environment itself is extremely evolved and performing. In Guicobol it is possible to generate instances instead of a runtime with the "add" methods ... addform addlabel..ecc.ecc. Powercobol projects are totally dependent on the development environment and the project code is all written in a proprietary format. The code managed by guicobol is always a conventional cobol source. It's okay to smell the code writing the preprocessor takes care of manually incorporating some methods in the basic functions. This means, for example, that the module when it is generated has a recall procedure for closing created by default (when this has not been defined by the programmer anyway). All the object fields that are declared in order to refer the instances of the objects must also be observed in the individual event procedures in the relative work-archiving area of ​​the single programs connected to the callback. Guicobol will consent to omit the writing of this code which will instead be managed automatically by the preprocessor This means that in the first main operating memory indicated it indicates all the fields that are used for the objects and the same instructions which then relocate all inside the individual working-storage generates preprocessor. Furthermore, the same methods connected to the events require an extremely minimal structure, therefore it will be sufficient to indicate them in the Method-Id header "name of the procedure" associated with the event to write under the code entered as already present in the presence of a DIVISION PROCEDURE. the intermediate code is added by the preprocessor.

Widgets


Guicobol has several kind of widgets: containers which are the base where you have to create your form widgets bottons, static label, combo, tabs and other.Actually I make first release of some of them but I have to prepare still a lot of them.. libagar has strong and beautilful objects rich of features.
You have to make first the window you can create the object by using a simple invoke SUPER "addform" returning SELF.
Then depending if you want to mange widget with fixed position you have to create a fixed or box containers

WINDOW

BOX

BUTTON

COMBOBOX

CHECKBOX

 

 

 

LABEL

FIXED

 

MENU

NUMERIC

PANE

PROGRESSIVE BAR

RADIO

SCROLLBAR

SCROLLVIEW

SLIDER

TEXTBOX

 


HORIZONTAL LINE

VERTICAL LINE


and now ..a complete sample

 

list of objects

NAME TYPE WIDGET CLASS DESCRIPTION USAGE




addbox METHOD BOX CONTAINERS add a box container invoke super "addform" RETURNING object

addbutton METHOD BUTTON WIDGET add a button invoke object "addscrollview" RETURNING object

addbuttonto METHOD BUTTON WIDGET add a button with on click procedure invoke parent "addbuttonto" using "testo" "procedure" RETURNING object
addcheck METHOD CHECK WIDGET add a check invoke parent "addcheck" using "testo" RETURNING object
addcheckto METHOD CHECK WIDGET add a check with on click procedure invoke parent "addcheckto" using "testo" "procedure" RETURNING object
addchild METHOD
FORM
WIDGET
add a child form to the ancestor
invoke form "addchild" returning achildform
addcombo METHOD COMBO WIDGET add a combo invoke object "addcombo" using "testo" RETURNING object
addevent METHOD EVENT WIDGET bind an evento to a procedure invoke object "addevent" using event procedure

addfixed METHOD FIXED CONTAINERS add a fixed container invoke parent "addfixed" RETURNING object

addform METHOD FORM FORM add a form invoke super "addform" RETURNING object

addframe METHOD FRAME CONTAINERS add a frame (vertical) invoke parent "addframe" RETURNING object

addhoriz METHOD FRAME WIDGET add a vertical frame invoke object "addHoriz"



additem METHOD COMBO RADIO WIDGET add an item to the appropriate widget invoke widget "additem" using text


addlabel METHOD LABEL WIDGET add a label invoke parent "addlabel" using "text" RETURNING object
addlink METHOD MENU WIDGET add a menu with an onclick procedure invoke menu "addlink" using "text" procedure returning anode
addmenu METHOD MENU WIDGET add a name of menu invoke object "addmenu" RETURNING object

addmenuitem METHOD MENU WIDGET add an item of the menu (dynamic) invoke menu "addmenueitem" using agar-text returning anode
addnode METHOD MENU WIDGET add a node under the appropriate menu object invoke menu "addnode" using agar-text returning anode
addnumeric METHOD NUMERIC WIDGET add a numeric invoke parent "addnumeric" using "testo" RETURNING object
addpane METHOD PANE CONTAINERS add a pane structure (with two box) invoke parent "addpane" using "vertic"/"horizonal" RETURNING side1 side2
addprogress METHOD PROGRESS WIDGET add a progressive bar invoke parent "addprogress" returning agar-object.

addproperty METHOD ANY WIDGET add a generic property to the object invoke widget "addproperty" using "name" value returning agar-object.
addradio METHOD RADIO WIDGET add a radio invoke parent "addradio" RETURNING object

addradioto METHOD RADIO WIDGET add a radio with onlclick procedure invoke parent "addradioto" using "ThisEventProcedure" RETURNING object
addscroll METHOD SCROLL CONTAINERS add a scroll (horizzontal) invoke parent "addscroll" returning object. (horizzontal)
addscrollv METHOD SCROLL CONTAINERS add a verfical scroll invoke parent "addscrollv" returning object. (horizzontal)
addscrollview METHOD SCROLL CONTAINERS add a scroll bar invoke parent "addscrollview" returning object. (horizzontal)
addslider METHOD SLIDER WIDGET add a slider invoke widget "addslider" returning agar-object. (horizzontal)
addsliderv METHOD SLIDER WIDGET add a vertical slider invoke widget "addsliderv" returning agar-object. (vertical)
addspaceshoriz METHOD FORM WIDGET add a space after the object invoke widget "addspacehoriz"


addspacesvertic METHOD FORM WIDGET add a space in vertical after the object invoke widget "addspacevertic"


addtext METHOD TEXT WIDGET add a textbox invoke parent "addtext" using "text" RETURNING object
addvertic METHOD FORM WIDGET add a vertical cosmetic separator invoke widget "addvertic"



close METHOD RUN WIDGET close the instance invoke self "close"



closed EVENT FORM FORM invoke a callback procedure on closed invoke self "closed" using procedure


connect METHOD TEXT WIDGET bind a text to a workin storage field invoke widget "connect" using buffer


disable METHOD ANY WIDGET disable the object invoke widget "disable"



DisableDebug METHOD GENERIC FORM stop the internal guicobol debugger from this method invoke self "disabledebug"


enable METHOD ANY WIDGET enable the object invoke widget "enable"



EnableDebug METHOD GENERIC FORM enable the internal guicobol debugger from this method invoke self "enabledebug"


expand EVENT FORM FORM expand the widget according the actual form size invoke object "expand"



expandheight EVENT FORM SEFL expand the widgets for heght invoke object "expandheight"


expandwidth EVENT FORM FORM expnad the widgets for width invoke object "expandwidth"


find METHOD FORM FORM find the object for the given name invoke parent "find" using "name" RETURNING object
get-caption PROPERTY LABEL FORM TEXT WIDGET sets a caption to the appropriate object move "caption" of self TO VARIABLE


get-class PROPERTY ANY WIDGET returns the class inherance for the object move "class" of object to agar-class


get-cursor PROPERTY TEXT WIDGET gets the cursor position inside the field move "cursor" of object to integer


get-focused PROPERTY ANY WIDGET obtains the focus for the widget move "focused" of self to widget


get-height PROPERTY ANY WIDGET returns the heigh of the widget move "height" of object to agar-height


get-left PROPERTY ANY WIDGET returns the left position for the widget (x coordinate) move "left" of object to agar-height


get-max PROPERTY NUMERIC WIDGET returns the max value acceptable for the widget move "max" of widget to value


get-min PROPERTY NUMERIC WIDGET returns the minimu value acceptable for the widget move "min" of widget to value


get-name PROPERTY ANY WIDGET returns the name for the widget move "name" of object to agar-text


get-node PROPERTY MENU WIDGET get the node object for the menu MOVE "node"" of menu TO VARIABLE


get-object PROPERTY ANY WIDGET returns the object for the called name widget move "object" of nome to agar-object


get-parent PROPERTY ANY WIDGET returns the parents for the object move "parent" of object to agar-parent

get-root PROPERTY ANY WIDGET returns the root for the object move "root" of object to agar-object


get-text PROPERTY TEXT WIDGET gets the text for the textbox move "text" of object to agar-text


get-top PROPERTY ANY WIDGET gets the cursor position inside the field move "top" of object to integer


get-value PROPERTY TEXT COMBO CHECK WIDGET gets the current value move "value" of check to value


get-width PROPERTY ANY WIDGET gets the width value move "width object to integer


getproperty PROPERTY ANY WIDGET get the property for the object (custom definition) invoke widget "getproperty" using "nome" returning valore
gotfocus METHOD ANY WIDGET sets the onfocus procedure for the widget invoke object "gotfocus"



hide METHOD ANY WIDGET hide the instanced widget invoke object "hide"



keydown TEXT WIDGET WIDGET sets the procedure while downling a keyboard invoke object "keydown" using procedure

keyreturn TEXT WDIGET WIDGET sets the procedure while returnign a keyboard invoke object "keydown" using procedure

keyup TEXT WIDGET WIDGET sets the procedure while updown a keyboard invoke object "keyup" using procedure


maximize METHOD FORM FORM maximizes the form invoke self "maximize"



menusection METHOD MENU FORM add a section menu (only text information) invoke menuobject "menusection" usign "this is a section"
menuseparator METHOD MENU FORM add a menu separator (cosmetic features) invoke menuobject "menuseparator"


minimize METHOD FORM WIDGET minimizes the current form invoke self "minimize"



move METHOD ANY WIDGET move the object at X Y coordinates invoke widget "move" using 100 200


refresh METHOD ANY WIDGET force e rendering for the widget invoke object "refresh"



remove METHOD MENU WIDGET remove the node from the menu invoke menuobject "remove" using this-node

run METHOD FORM FORM run the main event loop invoke object "run"



set-backcolor PROPERTY ANY WIDGET sets a back color for the widget move "red" to "backcolor" of widget


set-bordercolor PROPERTY ANY WIDGET sets a border color for the widget move "red" to "bordercolor" of widget


set-caption PROPERTY LABEL FORM TEXT WIDGET sets a caption to the appropriate object move "tittle" to "caption" of object


set-color PROPERTY ANY WIDGET sets a color for the widget move "red" to "color" of widget


set-cursor PROPERTY TEXT WIDGET sets a specific position for the cursor inside the text move Integer to "cursor" of object


set-decimal PROPERTY NUMERIC WIDGET binds a decimal to the numeric widget move "decimal" of numeric to buffer


set-disposition PROPERTY RADIO WIDGET sets disposition for the form move "horizontal" to "disposition" of radio

set-error EVENT FORM FORM invoke an error message upon the form move "severe error!!!" to "error" of self

set-font PROPERTY ANY WIDGET changes the font property move "courier" to "font" of widget (inline)

set-fontsize PROPERTY ANY WIDGET changes the font size move "100%" to "fontsize" of widget


set-fontstyle PROPERTY ANY WIDGET changes the font style move "italic" to "fontstyle" of widget


set-fontweight PROPERTY ANY WIDGET changes the font weight move "bold" to "fontweight" of widget (INLINE CODE)
set-height PROPERTY ANY WIDGET changes the forn height move 10 to "height" of object


set-homogenous PROPERTY FORM FORM arranges the widgets with homogenous space move agar-true to "homogenous" of widget

set-increment PROPERTY NUMERIC WIDGET sets a specific numeric increment for the widget move 2 to "increment" of widget


set-incrementdecimal PROPERTY NUMERIC WIDGET sets a float increment for the widget move 2.5 to "incrementdecimal" of widget

set-info EVENT FORM WIDGET invoke an information message move "ciao" to "warning" of self


set-isdecimal PROPERTY NUMERIC WIDGET returns a boolean value for the decimal widget move agar-true to "isdecimal" of widget

set-isnumeric PROPERTY NUMERIC WIDGET returns a boolean value for the numeric widget move agar-true to "isnumeric" of widget

set-left PROPERTY ANY WIDGET sets the appropriate x coordinates for the widget move 10 to "left" of object


set-max PROPERTY NUMERIC WIDGET sets a max value for the widget move 100 to "max" of object


set-maxdecimal PROPERTY NUMERIC WIDGET sets a max decimal value for the widget move 100 to "maxdecimal" of object


set-maxitem PROPERTY NUNERIC WIDGET sets the max number for allowed items move 10 to "maxitem" of widget


set-min PROPERTY NUMERIC WIDGET sets the minimum value for the widget move 100 to "min" of object


set-mindecimal PROPERTY NUMERIC WIDGET set the minimum flat value for the widget move 100 to "mindecimal" of object


set-name PROPERTY ANY WIDGET sets the name property for the widget move "this is the name" to "name" of object

set-numeric PROPERTY NUMERIC WIDGET sets the numeric binding the the widget move "numeric" of widget to thisfield


set-position PROPERTY FORM FORM sets the position for the form move position to "position" of window


set-prompt PROPERTY TEXT WIDGET sets a prompt value for the empty text move "insert a valid name" to "prompt" of object

set-render PROPERTY EDIT COMBO WIDGET forces the render to a specific pattern move "x(6)" to "render" of object


set-size PROPERTY SLIDER WIDGET sets the specific size value move 100 to "size" of object use for slider !!!!

set-text PROPERTY TEXT WIDGET sets the value of the text property move "valore" to "text" of text


set-textcolor PROPERTY ANY WIDGET sets the text color for the widget move "red" to "textcolor" of widget


set-top PROPERTY ANY WIDGET set the top (y coordinates) position move 10 to "top" of object


set-value PROPERTY COMBO NUMERIC WIDGET sets the value for the widget move agar-true to "value" of check


set-visible PROPERTY ANY WIDGET puts the widget visible move agar-true to "visible" of object


set-warning EVENT FORM FORM display a warning message upon the form move "stay quiet" to "warning" of self


set-width PROPERTY ANY WIDGET assignes the appropriate width to the widget move 10 to "width" of object


show METHOD FORM FORM shows the form (force rendering) invoke object "show"



size PROPERTY ANY WIDGET sets the appropriate size for the widget invoke widget "size" using 100 200


stoprun EVENT FORM FORM do a stop run invoke super "stoprun"



zoomin EVENT FORM FORM zoomin all widgets inside the form (reduce) invoke super "zoomin"



zoomout EVENT FORM FORM zooout all widgets inside the form (enlarge) invoke super "zoomout"



zoomreset EVENT FORM FORM reset the normal widgets size invoke super "zoomreset"



  here a short sample 

000010 IDENTIFICATION DIVISION. 000020 PROGRAM-ID. demo2. 000030 ENVIRONMENT DIVISION. 000040 DATA DIVISION. 000050 WORKING-STORAGE SECTION. 000060 01 abox usage pointer external. 000070 01 alabel usage pointer external. 000080 000100 PROCEDURE DIVISION. 000110 000120 invoke SUPER "addform" returning SELF. 000130 000140 move "GuiCOBOL TEST" to "caption" of self 000150 000160 move "orangered" to "color" of self. 000170 000180 invoke self "addbox" returning abox 000190 000200 move "this is a box" to "caption" of abox 000210 000220 move 1 to "homogenous" of abox 000230 000240 invoke abox "addlabel" using "simple line" returning alabel. 000250 000260 invoke abox "addlabel" using "another simple line" returning alabel. 000270 000280 invoke self "show" 000290 000300 invoke SELF "Closed" using "exitForm" 000310 000320 invoke SELF "run" 000330 000340 stop run. 000350 000360 end program demo2. 000370 000380 method-id. exitForm. 000390 000400 procedure division. 000410 000420 invoke self "close". 000430 000440 invoke self "stoprun". 000450 000460 exit program.000470 end method. 000480 000490

becomes...
000001  IDENTIFICATION DIVISION.
000002  PROGRAM-ID.    demo2.
000003  ENVIRONMENT DIVISION.
000004  DATA DIVISION.
000005  WORKING-STORAGE SECTION.
000006           copy "global".
000007  01 abox                 usage pointer external.
000008  01 alabel               usage pointer external.
000009  PROCEDURE DIVISION.
000270*          invoke SUPER "addform" returning SELF.
000010      move "addform"             to agar-function
000011      call agar-cobol
000012      if agar-main = NULL  move agar-object to agar-main end-if
000013      move  agar-object          to
000014      agar-Form
000015             .
      *          move  "GuiCOBOL TEST"  to "caption" of self
000016      move "set-caption"         to agar-function
000017      move  "GuiCOBOL TEST"
000018                                 to agar-text
000019      move
000020      agar-Form
000021                                 TO agar-object
000022      call agar-cobol
      *          move "orangered" to "color" of self.
000023     call static "AG_SetStyle" using
000024         by value
000025      agar-Form
000026            by content "color"
000027            by content
000028             '#FF4500'
000029     end-call
000030*
000031* this note will be added to the gui source
000032*
            *          invoke self "addbox" returning  abox
000034      move
000035      agar-Form
000036                                 to agar-object
000037      move "addbox"            to agar-function
000038      call agar-cobol
000039      move                       agar-widget to
000040      abox
            *        move "this is a box" to "caption" of abox
000041      move "set-caption"         to agar-function
000042      move "this is a box"
000043                                 to agar-text
000044      move
000045      abox
000046                                 TO agar-object
000047      call agar-cobol
            *          move 1 to "homogenous" of abox
000048         CALL  STATIC  "AG_BoxSetHomogenous"
000049          using by value
000050      abox
000051              by value 1
000053          end-call
             *          invoke abox "addlabel" using "simple line" returning alabel.
000054      move
000055      abox
000056                                 to agar-object
000057      move
000058      "simple line"
000059                                 to agar-text
000060      move "addlabel"           to agar-function
000061      call agar-cobol
000062      move                       agar-widget to
000063      alabel
000064             .
             *          invoke abox "addlabel" using "another simple line" returning alabel.
000065      move
000066      abox
000067                                 to agar-object
000068      move
000069      "another simple line"
000070                                 to agar-text
000071      move "addlabel"           to agar-function
000072      call agar-cobol
000073      move                       agar-widget to
000074      alabel
000075             .
               *          invoke self "show"
000076      move
000077      agar-Form
000078                                 to agar-widget
000079      move "set-visible"         to agar-function
000080      call agar-cobol
               *          invoke SELF  "Closed" using "exitForm"
000081*
000082**  link the event to the required procedure
000083*
000084      move
000085      agar-Form
000086                                 to agar-object
000087      set agar-callback          to entry
000088      "exitForm"
000089      move
000090      "exitForm"
000091                                 TO agar-procedure
000092      move "window-detached" & X"00"   to agar-event
000093      move "setevent"            to agar-function
000094      call agar-cobol
             *          invoke SELF "run"
000095      call "AG_EventLoop" returning  agar-eventManager
000096           stop run.
000097  end program demo2.
000098  identification division.
000099  program-id. exitForm.
000100  environment division.
000101  data  division.
000102  working-storage section.
000103       copy "global".
000104       copy "working".
000105  procedure division.
              *           invoke self "close".
000106      call "AG_QuitGUI" using by value 0
000107         returning omitted end-call
000108             .
              *           invoke self  "stoprun".
000109      call "AG_Terminate" using by value 0
000110          returning omitted end-call
000111             .
000112            exit program.
000113 end program exitForm. 

Download batch for GuiCOBOL under Windows

These windows batch can help to manage the source you are writing.       
  • cobagar compiles your agarcob.cbl making the agarcob.dll librar
  • animagar compiles the agarcob.cbl for animating
  • cobgui compiles a ".cbl" and make and build the ".gui" as ".exe" (default)
  • animate compiles a ".cbl" and make a ".exe" animated executable
  • anigui invokes the animator for a ".gui" file
  • cobcbl compiles a ".cbl" adding agar libraries without invoking GuiCOBOL
  • animcbl animates a ".cbl"  without invoking GuiCOBOL
  • menu just lists the available batch files.
 

Frequently Asked Questions

-It is possible to use TP-COBOL-DEBUGGER to animate a guicobol program?

Yes you have to use -k animator feature to join both environment (guicobol and tp-cobol-debugger)

guicobol %1.cbl
animator %1.gui -k -c
cobc %1.ani -x -v -fno-gen-c-decl-static-call -LC:/cygwin64/usr/local/lib -lag_gui -lag_core -I"C:/cygwin64/usr/local/include/agar" -I"C:/cygwin64/usr/include/SDL" -I"c:/cygwin64/usr/include/freetype2" -I"C:/cygwin64/usr/include/libpng16" -I"C:/cygwin64/usr/include/freetype2" -I"C:/cygwin64/usr/include/uuid" -L"C:/cygwin64/usr/lib" -lSDL.dll -lfreetype -lfontconfig -lfreetype -lopengl32 -lgdi32 -lX11 -lXinerama -lm -ljpeg -lpng16 -lwinmm

in this example guicobol make its .gui result file. then the animate uses it and make the debug intermediate cobol code (.ani) by using the -k feature (keep the internal ani file) then you have to compile the .ani file with the libraries

- how does it run the internal debugger of Guicobol ?

Guicobol has the capability to start the internl debugger (that view a console with agacob parameters used). You can set on its environement variable GuiCOBOLdebug=enable to run it at every call otherwise you can decide to start it only in specific section of your code so in this case you have to invoke where you want to put it on or off these sentences:

invoke super "EnableDebug"

invoke super "DisableDebug"

 

-Can I define a specific range of code where I want to use the animator inside a guicobol program with TP-COBOL-DEBUGGER ?

Guicobol can make a lot of internal code to manage a cobol debugger section You can avoid to spent time during the execution for sections you wanto to evaluate. in these cases you have only to to set SET-DEBUG-ON

before the line you want to start the debugger and e SET-DEBUG-OFF where you want to stop the evaluation.

It's better then start your procedure with SET-DEBUG-OFF to turn off the analysis and after use on and of

to manage the sections you want to investigate ...so after that you have only to run the animator with

c:\>animator -x yourcode) since this directives are working during the generation of cobol code.


-Can I use TP-COBOL-DEBUGGER to animate only the agarcob.dll guicobol library ?

Yes since the agarcob required a .dll format you have only to check to run the cobc without -x parameter

guicobol %1.cbl
animator %1.gui -k -c
cobc %1.ani -v -LC:/cygwin64/usr/local/lib -lag_gui -lag_core -I"C:/cygwin64/usr/local/include/agar" -I"C:/cygwin64/usr/include/SDL" -I"c:/cygwin64/usr/include/freetype2" -I"C:/cygwin64/usr/include/libpng16" -I"C:/cygwin64/usr/include/freetype2" -I"C:/cygwin64/usr/include/uuid" -L"C:/cygwin64/usr/lib" -lSDL.dll -lfreetype -lfontconfig -lfreetype -lopengl32 -lgdi32 -lX11 -lXinerama -lm -ljpeg -lpng16 -lwinmm