eXperimental Guicobol PDF Stampa
Valutazione attuale: / 0
ScarsoOttimo 

 

The eXperimental Guicobol is a preprocessor that give you the opportunity to manage a gui using the GTK opensource libraries.

To take a copy of the opensource Guicobol

To share our Italian OpenCOBOL Group or for italian manuals..http://t0.gstatic.com/images?q=tbn:ANd9GcROa3DaWpCWR9TBiZDIacGOzyJMANAFCUR4z2WzPbKh-ZPqNvXZ

 

Introduction

Gui objects are simply declared in working storage section with the cobol object reference usage picture. Some objects are pre-defined from the gtkcobol tool itself.

Last version 0.1.4  29 January 2012

colour release legend:

// available with...0.1.1 version - // available with... 0.1.2 version // available with... 0.1.3 version

// available with... 0.1.4 version

 

000010  IDENTIFICATION DIVISION.
000020  PROGRAM-ID.    guitest.
000030  ENVIRONMENT DIVISION.
000040  DATA DIVISION.
000050  WORKING-STORAGE SECTION.
000060
000070  01 check             usage pointer external.
000080  01 parent            usage pointer.
000090  01 radio             usage pointer external.
000090  01 radio1            usage pointer external.
000090  01 radio2            usage pointer external.
000090  01 button            usage pointer external.
000100  01 button1           usage pointer external.
000110  01 button2           usage pointer external.
000120  01 edit              usage pointer external.
000130  01 edit1             usage pointer external.
000140  01 edit2             usage pointer external.
000150  01 label1            usage pointer external.
000160  01 label2            usage pointer external.
000170  01 label3            usage pointer external.
000180  01 label4            usage pointer external.
000190  01 label5            usage pointer external.
000200  01 label6            usage pointer external.
000200  01 combo             usage pointer external.
000200  01 frame             usage pointer external.

Every pre-defined objects are stored into a system copy named global.cpy

*
** GuiCobol private objects
*
01 gtk-main          usage pointer       external.
01 gtk-previous      usage pointer       external.
01 gtk-form          usage pointer       external.
01 gtk-panel         usage pointer       external.
01 gtk-parent        usage pointer       external.
01 gtk-group         usage pointer       external.
01 gtk-object        usage pointer       external.
01 gtk-menu          usage pointer       external.
01 gtk-struct        usage pointer       external.
01 gtk-function      pic x(100)          external.
01 gtk-text          pic x(512)          external.
01 gtk-string        pic x(512)          external.
01 gtk-event         pic x(100)          external.
01 gtk-number        pic s9(12)v9(6)     external.
01 gtk-key-code      usage binary-long   external.
01 gtk-key-char      pic x               external.
01 gtk-button-code   pic s9(5) comp-5    external.

78 GTK-LEFT-CLICK         VALUE 1.
78 GTK-LEFT-DOUBLECLICK   VALUE 2.
78 GTK-LEFT-TRIPLECLICK   VALUE 3.
78 GTK-MIDLE-CLICK        VALUE 4.
78 GTK-MIDLE-DOUBLECLICK  VALUE 5.
78 GTK-MIDLE-TRIPLECLICK  VALUE 6.
78 GTK-RIGHT-CLICK        VALUE 7.
78 GTK-RIGHT-DOUBLECLICK  VALUE 8.
78 GTK-RIGHT-TRIPLECLICK  VALUE 9.


01 gtk-style         usage binary-long    external.
01 gtk-int           usage binary-long    external.
01 gtk-boolean       pic s9(5) comp-5     external.
01 gtk-x             usage binary-long    external.
01 gtk-y             usage binary-long    external.
01 gtk-width         usage binary-long    external.
01 gtk-height        usage binary-long    external.
01 gtk-use-width     usage binary-long    external.
01 gtk-use-height    usage binary-long    external.
01 gtk-red           usage unsigned-short external.
01 gtk-green         usage unsigned-short external.
01 gtk-blue          usage unsigned-short external.
01 gtk-callback  usage procedure-pointer external.


01 params            usage pointer.
01 result            usage binary-long   external.
01 gtk-started       pic 9               external.
01 gtk-cobol         pic x(8)            value "gtkcobol".
01 gtk-buffer        pic x(512)          value space.


78 gtk-true          value 1.
78 gtk-false         value zeros.
78 gtk-on            value 1.
78 gtk-off           value zeros.
78 gtk-default-height value -1.
78 gtk-default-width value 25.

*
** contants cursors
*

78 GDK_X_CURSOR               VALUE 0.
78 GDK_ARROW                  VALUE 2.
78 GDK_BASED_ARROW_DOWN       VALUE 4.
78 GDK_BASED_ARROW_UP         VALUE 6.
78 GDK_BOAT                   VALUE 8.
78 GDK_BOGOSITY               VALUE 10.
78 GDK_BOTTOM_LEFT_CORNER     VALUE 12.
78 GDK_BOTTOM_RIGHT_CORNER    VALUE 14.
78 GDK_BOTTOM_SIDE            VALUE 16.
78 GDK_BOTTOM_TEE             VALUE 18.
78 GDK_BOX_SPIRAL             VALUE 20.
78 GDK_CENTER_PTR             VALUE 22.
78 GDK_CIRCLE                 VALUE 24.
78 GDK_CLOCK                  VALUE 26.
78 GDK_COFFEE_MUG             VALUE 28.
78 GDK_CROSS                  VALUE 30.
78 GDK_CROSS_REVERSE          VALUE 32.
78 GDK_CROSSHAIR              VALUE 34.
78 GDK_DIAMOND_CROSS          VALUE 36.
78 GDK_DOT                    VALUE 38.
78 GDK_DOTBOX                 VALUE 40.
78 GDK_DOUBLE_ARROW           VALUE 42.
78 GDK_DRAFT_LARGE            VALUE 44.
78 GDK_DRAFT_SMALL            VALUE 46.
78 GDK_DRAPED_BOX             VALUE 48.
78 GDK_EXCHANGE               VALUE 50.
78 GDK_FLEUR                  VALUE 52.
78 GDK_GOBBLER                VALUE 54.
78 GDK_GUMBY                  VALUE 56.
78 GDK_HAND1                  VALUE 58.
78 GDK_HAND2                  VALUE 60.
78 GDK_HEART                  VALUE 62.
78 GDK_ICON                   VALUE 64.

*
** contants events
*

78 GDK_NOTHING                VALUE -1.
78 GDK_DELETE                 VALUE  0.
78 GDK_DESTROY                VALUE  1.
78 GDK_EXPOSE                 VALUE  2.
78 GDK_MOTION_NOTIFY          VALUE  3.
78 GDK_BUTTON_PRESS           VALUE  4.
78 GDK_2BUTTON_PRESS          VALUE  5.
78 GDK_3BUTTON_PRESS          VALUE  6.
78 GDK_BUTTON_RELEASE         VALUE  7.
78 GDK_KEY_PRESS              VALUE  8.
78 GDK_KEY_RELEASE            VALUE  9.
78 GDK_ENTER_NOTIFY           VALUE 10.
78 GDK_LEAVE_NOTIFY           VALUE 11.
78 GDK_FOCUS_CHANGE           VALUE 12.
78 GDK_CONFIGURE              VALUE 13.
78 GDK_MAP                    VALUE 14.
78 GDK_UNMAP                  VALUE 15.
78 GDK_PROPERTY_NOTIFY        VALUE 16.
78 GDK_SELECTION_CLEAR        VALUE 17.
78 GDK_SELECTION_REQUEST      VALUE 18.
78 GDK_SELECTION_NOTIFY       VALUE 19.
78 GDK_PROXIMITY_IN           VALUE 20.
78 GDK_PROXIMITY_OUT          VALUE 21.
78 GDK_DRAG_ENTER             VALUE 22.
78 GDK_DRAG_LEAVE             VALUE 23.
78 GDK_DRAG_MOTION            VALUE 24.
78 GDK_DRAG_STATUS            VALUE 25.
78 GDK_DROP_START             VALUE 26.
78 GDK_DROP_FINISHED          VALUE 27.
78 GDK_CLIENT_EVENT           VALUE 28.
78 GDK_VISIBILITY_NOTIFY      VALUE 29.
78 GDK_SCROLL                 VALUE 31.
78 GDK_WINDOW_STATE           VALUE 32.
78 GDK_SETTING                VALUE 33.
78 GDK_OWNER_CHANGE           VALUE 34.
78 GDK_GRAB_BROKEN            VALUE 35.
78 GDK_DAMAGE                 VALUE 36.


It uses the object oriented syntax and the cobol logic to manage it. Then the programmer can use the move to get and set the properties value and the invoke verbs to perform the methods available for them.

 

List of principal class objects available

 

Form, Text, Label, Combo,  Frame, Check,  Radio, Buttons.

Every class's objects must be created at runtime. Once created them you can manage the properties that can  have a default value assigned from  the constructor (invoked method to create them).

Events can be cached by using the appropriate cobol procedure you want to execute for.

every cobol procedure can have a linkage due to pass the widget and the data (see key property for an example at text field) e.g.:

Linkage section.
01 gtk-window           usage pointer.
01 gtk-data             usage pointer.

procedure division using by value gtk-window by value gtk-data.

Form

The form class has the pre-defined GTK-FORM that is created to build a window. It is declared into the global.cpy copy and you can also reference it with the SELF word.

 

List of methods of the form


openform The openform is the first you have to run to create the pre-defined  gtk-form

invoke gtk-form "openform"


createform // 0.1.2 version The createform is the first you have to run to create the pre-defined  gtk-form

invoke self "createform"

it's is like the openform only just map the closeform automatically when the "X" is clicked on the form

 

showform The showform is allows you to view the form and all its objects (widgets)

invoke gtk-form "showform"


runform The runform starts the event loop

invoke gtk-form "runform"


closeform destroy the window associated to gtk-form

invoke gtk-form "closeform"


stoprun stop the event loop

invoke gtk-form "stoprun"


createframe create a frame <object> with the specified title at x y given coordinates

invoke self "createframe" using <object> "frame title" line <x-coordinate>  position <y-coordinate>

once the frame is created you can set/get the property and manage the event for  the <object> made


createbutton create a button <object> with the specified title at x y given coordinates

invoke self "createbutton" using <object>     "End" line <x-coordinate>  position <y-coordinate>


createtext create an edit text field <object> with the specified title at x y given coordinates

invoke self "createtext" using <object>    line <x-coordinate>  position <y-coordinate>


createlabel create a static lable <object> with the specified title at x y given coordinates

invoke self "createbutton" using <object>  "First name"  line <x-coordinate>  position <y-coordinate>


createcheck create a check field  <object> with the specified title at x y given coordinates

invoke self "createcheck" using <object>  "Turn on/off" line <x-coordinate>  position <y-coordinate>


createcombo create a combo list field <object> with the specified title at x y  given    coordinates

invoke self "createcombo" using <object>  line <x-coordinate>  position <y-coordinate>


createradio create a radio field  <object> with the specified title at x y given coordinates

invoke self "createradio" using <object>  "First Option" line <x-coordinate>  position <y-coordinate>

 

message create an information modal message dialog waiting for the user ok confirm // 0.1.1 version

invoke self "message" using "hello world"

 

warning create a warning modal message dialog waiting for the user ok confirm // 0.1.1 version

invoke self "warning" using "take the umbrella ... the weather is going to rain !"


severe create a severe modal message dialog waiting for the user ok confirm // 0.1.1 version

invoke self "severe" using " You didn't download the Experimental Guicobol... :-("

 

get-question create a question modal message with yes/no buttons and returns gtk-true (yes) or gtk-false (no) // available with... 0.1.3 version

invoke self "get-question" using " didn't you download the Experimental Guicobol ?" returning gtk-int

if gtk-int = gtk-true .....

 

get-message  get-warning get-severe....// available with... 0.1.3 version

The same features with the appropriate dialog

 

get-pointer The get-pointer allows you to get the mouse coordinates // 0.1.2 version

invoke gtk-form "get-pointer" using gtk-x gtky

 

loadgui load the gui schema from a xml (glade file)

invoke pow-self "loadgui" using "form.xml" returning gtk-builder // available with... 0.1.4 version

 

List of events of the Forms

 

closed performed when the windows is closed

invoke gtk-form "closed" using <cobolprocedure>

e.g.

000920  invoke gtk-form "Closed" using "exitForm"

exit program.

001120  identification division.
001130  program-id. exitForm.
001140  data division.
001150  working-storage section.
001160  77 testo             pic x(100).
001170
001230      copy "global".
001240
001250
001260  procedure division.
001270
001290            move "title" of gtk-form to testo.
001300
001310            display " exitform from " testo.
001320
001330            invoke gtk-form "closeform".
001340
001350  exit program.
001360  end program exitForm.


List of properties of the Form

 

title Get or set the tittle of the gtk-form with pic x(n) picture

move "this is the title" of "title" of gtk-form

77 title-field pic x(100)

.....move "title" of gtk-form to title-field


modal Get or set the windows modal status with boolean (GTK-TRUE GTK-FALSE)

move GTK-TRUE  to "modal" of gtk-form

IF "modal" of gtk-form = gtk-true .......

 

cursor Get or set the windows cursor for mouse // available with... 0.1.3 version

move 2  to "cursor" of gtk-form

IF "cursor" of gtk-form = 1....


global.cpy contains cursor type items

 
GDK_X_CURSOR
GDK_ARROW
GDK_BASED_ARROW_DOWN
GDK_BASED_ARROW_UP
GDK_BOAT
GDK_BOGOSITY
GDK_BOTTOM_LEFT_CORNER
GDK_BOTTOM_RIGHT_CORNER
GDK_BOTTOM_SIDE
GDK_BOTTOM_TEE
GDK_BOX_SPIRAL
GDK_CENTER_PTR
GDK_CIRCLE
GDK_CLOCK
GDK_COFFEE_MUG
GDK_CROSS
GDK_CROSS_REVERSE
GDK_CROSSHAIR
GDK_DIAMOND_CROSS
GDK_DOT
GDK_DOTBOX
GDK_DOUBLE_ARROW
GDK_DRAFT_LARGE
GDK_DRAFT_SMALL
GDK_DRAPED_BOX
GDK_EXCHANGE
GDK_FLEUR
GDK_GOBBLER
GDK_GUMBY
GDK_HAND1
GDK_HAND2
GDK_HEART
GDK_ICON
GDK_IRON_CROSS
GDK_LEFT_PTR
GDK_LEFT_SIDE
GDK_LEFT_TEE
GDK_LEFTBUTTON
GDK_LL_ANGLE
GDK_LR_ANGLE
GDK_MAN
GDK_MIDDLEBUTTON
GDK_MOUSE
GDK_PENCIL
GDK_PIRATE
GDK_PLUS
GDK_QUESTION_ARROW
GDK_RIGHT_PTR
GDK_RIGHT_SIDE
GDK_RIGHT_TEE
GDK_RIGHTBUTTON
GDK_RTL_LOGO
GDK_SAILBOAT
GDK_SB_DOWN_ARROW
GDK_SB_H_DOUBLE_ARROW
GDK_SB_LEFT_ARROW
GDK_SB_RIGHT_ARROW
GDK_SB_UP_ARROW
GDK_SB_V_DOUBLE_ARROW
GDK_SHUTTLE
GDK_SIZING
GDK_SPIDER
GDK_SPRAYCAN
GDK_STAR
GDK_TARGET
GDK_TCROSS
GDK_TOP_LEFT_ARROW
GDK_TOP_LEFT_CORNER
GDK_TOP_RIGHT_CORNER
GDK_TOP_SIDE
GDK_TOP_TEE
GDK_TREK
GDK_UL_ANGLE
GDK_UMBRELLA
GDK_UR_ANGLE
GDK_WATCH
GDK_XTERM
GDK_LAST_CURSOR
GDK_CURSOR_IS_PIXMAP

 


Text edit

The text field is created by using the "createtext" invoke method, atfer you can manage it with specific and global properties inheredis from form

 

List of properties of the Text edit

 

text Get or set the text inside the edit field with pic x(n) picture

77 your-country usage object reference.

procedure division.

invoke mk-form "createtext" using your-contry line 10 position 20

move "Italy"  to "text"  of your-country

or a get method...

77 edit-value  pic x(20).

move "text" of edit to edi-value.

 

max Get or set the max number of charactes accepted inside the edit field // 0.1.2 version

move 10 to "max" of edit

 

if "max" of edit  = 10

invoke self  "warning" using  " this field accept al least 0 to 10 characters !"


key Get the pressed key (look ahead the pressed cobol procedure) from the gtk-data  linkage  object

 

List of the events of Text edit

 

gotfocus performed when the object got the keyboard focus

invoke edit  "gotfocus" using <cobolprocedure> // 0.1.1 version

lostfocus performed when the object lost the keyboard focus

invoke edit  "lostfocus" using <cobolprocedure> // 0.1.1 version

keypress performed when the user press a key during the focus of the object

invoke edit  "keypress" using <cobolprocedure> // 0.1.1 version

keyrelease performed when the user release the pressed  key during the focus of the object

invoke edit  "keyrelease" using <cobolprocedure> // 0.1.1 version

keypress example  cobolprocedure // 0.1.1 version

002120  identification division.
002130  program-id. pressed.
002140  data division.

002150  working-storage section.
002160  01 edit                 usage pointer external.
002170  01 edit1                usage pointer external.
002170  01 edit2                usage pointer external.
002180  01 check                usage pointer external.
002190  01 valore               pic zzzzzz9.
002200  78 GTK-ESCAPE VALUE 27.
002200      copy "global".
001880 linkage section.
001890 01 gtk-window           usage pointer.
001900 01 gtk-data             usage pointer.
001910
001920 procedure division using by value gtk-window by value gtk-data.

move "key" of gtk-data to valore.
move valore     to "TEXT" of edit2.

or also during an if statement...


if "key" of gtk-data = GTK-ESCAPE
DISPLAY "you pressed ESC".


002310
002320  exit program.
002330  end program pressed.


Check button

The check button field is created by using the "createcheck" invoke method, atfer you can manage it with specific and global properties inheredis from form

 

List of properties of the check

 

value Get or set the boolean value of the check field

move gtk-true to "value" of check

IF "value" of check = gtk-on

 

List of the events of check


clicked performed when a click is performed

invoke check "clicked" using <cobolprocedure>

 

gotfocus performed when the object got the keyboard focus

invoke edit  "gotfocus" using <cobolprocedure> // 0.1.1 version

lostfocus performed when the object lost the keyboard focus

invoke edit  "lostfocus" using <cobolprocedure> // 0.1.1 version


 

Radio field

The radio field is created by using the "createradio" invoke method, atfer you can manage it with specific and global properties inheredis from form.

 

List of methods of the radio

 

addradio add a radio field  <object> to the  <radio> with the specified title at x y

given coordinates

invoke <radio> "addradio" using <object> "second Option" line <x-coordinate>

position <y-coordinate>

 

List of properties of the radio


value Get or set the boolean value of the radio field

move gtk-true to "value" of radio

IF "value" of radio = gtk-true .......(or gtk-on ...)

 

List of the events of radio


clicked performed when a click is performed

invoke radio  "clicked" using <cobolprocedure>

 

gotfocus performed when the object got the keyboard focus

invoke edit  "gotfocus" using <cobolprocedure> // 0.1.1 version

lostfocus performed when the object lost the keyboard focus

invoke edit  "lostfocus" using <cobolprocedure> // 0.1.1 version


 

label

The label contains the text you want to show like a stati, the -1 height value specified that the value is changed to the automatic value.

 

List of properties of the label


caption Get or set the caption of the label object

move "hello" to "caption" of label1

IF "caption" of label1 = "hello"

 

justify Get or set the justify property of the label object  // available with... 0.1.3 version

GTK_JUSTIFY_LEFT

The text is placed at the left edge of the label.

GTK_JUSTIFY_RIGHT

The text is placed at the right edge of the label.

GTK_JUSTIFY_CENTER

The text is placed in the center of the label.

GTK_JUSTIFY_FILL

The text is placed is distributed across the label.

move GTK_JUSTIFY_RIGHT to "justify" of label1...

IF "justify" of label1 = GTK_JUSTIFY_CENTER


frame

properties methods and events NOT YET implemented

 

Combo

The combo field is created by using the "createcombo" invoke method, atfer you can manage it with specific and global properties inheredis from form

 

List of methods of the combo field

 

addstring add an element to the combo field  <object> to coordinates

invoke combo "addstring" using "first element"

invoke combo "addstring" using "second element"

invoke combo "addstring" using "third element"



List of properties of the combo

 

selstring Get the selected item of the combo

move "selstring" of combo to stringa

IF "selstring" of combo = "third element".....

 

Selindex Get/Set the selected active index of the combo // available with... 0.1.3 version

move "selindex" of combo to index

IF "selindex" of combo =  zeros

invoke warning using  "chose an item..."  

move 1 to  "selindex" of combo

List of the events of radio button


changed performed when changed item is performed at the combo list

invoke combo "changed" using <cobolprocedure>


Global method  Form, Text, Label, Combo,  Frame, Check,  Radio, Buttons.

 

setsize Assign the <width> and <heigth> size to  the invoked <object>

invoke <anyobject> "setsize" using <width> <heigth>

e.g. invoke gtk-form "setsize" using 800 600


show Shown the invoked <object> usually for a refresh

invoke <anyobject> "show"


moveto move to object to the specified x y coordinates 

invoke <anyobject> "moveto"  using x y.  ("using" was added with //0.1.2 version to use the same syntax of other statements


 

finalize Delete the invoked <object>

invoke <anyobject> "finalize"

 

setfocus Set the  object to grab the focus  // 0.1.1 version

invoke <anyobject> "setfocus"

 

Global properties  for Form, Text, Label, Combo,  Frame, Check,  Radio, Buttons.

 

width Get or set the width  of the object  with pic s9(5) comp-5 picture

move 800 to "width" of gtk-form

77 width-value  pic s9(5) comp-5.

move "width" of gtk-form to width-value


height Get or set the height  of the gtk-form or object with pic s9(5) comp-5 picture

move 600 to "height" of gtk-form

77 height-value  pic s9(5) comp-5.

move "height" of gtk-form to height-value


forecolor Set the foreground color of the  object

move "red" to "forecolor"of label

 

backcolor Set the background color of the  object

move "blue" to "backcolor"of label

move "123,333,232" to "backcolor" of label


forecolor-text Set the foreground color of the  text object // 0.1.1 version

move "red" to "forecolor-text " of edit

 

backcolor-text Set the background color of the  text object // 0.1.1 version

move "blue" to "backcolor-text" of edit


name Set or get the name for the object // 0.1.1 version

move "surname" to "name" of edit1

 

parent Get the parent of the invoked object // 0.1.1 version

move "parent" of  edit  to parent

 

tooltip Set or get the tooltip text for the object // 0.1.1 version

move "enter the surname" to "tooltip" of edit1

 

visible Get or set the boolean value of the visibility for the object // 0.1.1 version

move gtk-true to "visible" of radio

IF "visible" of radio = gtk-true .......(or gtk-on ...)

 

font set the font value for the object // 0.1.1 version

 

move "arial italic 18" to "font" of static1

move "arial bold 10" to "font" of static2

 

enabled Get or set the boolean value of the sensitive for the object // 0.1.2 version

move gtk-true to "enabled" of radio

IF "enabled" of radio = gtk-true .......(or gtk-on ...)

Global events for Form, Text, Label, Combo,  Frame, Check,  Radio, Buttons.


buttonpressed get the  mouse button pressed // 0.1.2 version

invoke <anyobject> "buttonpressed" using cobolprocedure

buttonreleased get the  mouse button released // 0.1.2 version

invoke <anyobject> "buttonreleased" using cobolprocedure

a cobol procedure could be...

001000    invoke edit "buttonpress"    using "mousepressed".
exit program.

002120  identification division.
002130  program-id. mousepressed.
002140  data division.

002150  working-storage section.
002200      copy "global".

001880 linkage section.
001890 01 gtk-window         usage pointer.
001900 01 gtk-data             usage pointer.
001910
001920 procedure division using by value gtk-window by value gtk-data.

if "button" of gtk-data = ....(see next lines)

mouse click available evaluations:// 0.1.2 version

if "button" of gtk-data = GTK-LEFT-CLICK DISPLAY "LEFT CLICK".

if "button" of gtk-data = GTK-LEFT-DOUBLECLICK DISPLAY "DOUBLE LEFT CLICK".

if "button" of gtk-data = GTK-LEFT-TRIPLECLICK DISPLAY "TRIPLE LEFT CLICK".


if "button" of gtk-data = GTK-MIDLE-CLICK DISPLAY "MIDLE CLICK".

if "button" of gtk-data = GTK-MIDLE-DOUBLECLICK DISPLAY "DOUBLE MIDLE CLICK".

if "button" of gtk-data = GTK-LEFT-TRIPLECLICK DISPLAY "TRIPLE MIDLE CLICK".

if "button" of gtk-data = GTK-RIGHT-CLICK DISPLAY "RIGHT CLICK".

if "button" of gtk-data = GTK-RIGHT-DOUBLECLICK DISPLAY "DOUBLE RIGHT CLICK".

if "button" of gtk-data = GTK-RIGHT-TRIPLECLICK DISPLAY "TRIPLE RIGHT CLICK".

 

mousepressed get the  mouse button pressed // available with... 0.1.3 version

invoke <anyobject> "mousepressed" using cobolprocedure

mousereleased get the  mouse button released // available with... 0.1.3 version

invoke <anyobject> "mousereleased" using cobolprocedure

a cobol procedure could be...

PS. these signals are the same of buttonpressed and buttonreleased.. just to remember better than you can get from the mouse you can use the same features with this new invoked names.


Click here to view the latest video ( 15 October 2011)

Click here to view the latest pdf example source file (31 October 2011)

Builder // available with... 0.1.4 version

The builder object is creatae by using the "loadGui" method,

List of methods of the builder object

getobject get the object by searching it's name into the xml obecjt  // available with... 0.1.4 version

invoke gtk-builder "getobject" using  "main-window" returning window

move "new title" to "title" of window

 

Index


Introduction

List of principal class objects available


Form List of methods ...

List of events

List of properties

Text List of properties

List of events

Check List of property

List of events

Radio List of methods ...

List of events

List of properties

Label List of properties

frame

Combo List of methods ...

List of properties

List of events

Global events for Form, Text, Label, Combo,  Frame, Check,  Radio, Buttons.

Builder List of methods

Using the animator for guicobol

To run the guicobol inside the animator you have to build a batch process with these lines:


guicobol %1.cbl
animator %1.gui -k
cobc %1.ani ocgtk.o -x

Ultimo aggiornamento Sabato 20 Ottobre 2012 06:58