Project

General

Profile

Scol standard library package  0.3.1
Common and usefull functions for all Scol applications
button.pkg File Reference

Customized buttons API. More...

Classes

struct  L2D_BUTTON
 Opaque internal structure. You should not call it directly, use API instead ! More...

Typedefs

typedef struct mkL2D_BUTTON L2D_BUTTON

Functions

 lib2d_but_cbclick (o, strBut, x, y, nbutton)
 lib2d_but_cbclick2 (o, strBut)
 lib2d_but_cbdestroy (o, strBut)
 lib2d_but_cbdrop (o, strBut, x, y, lFiles)
 lib2d_but_cbpaint (o, strBut)
 lib2d_but_destroy (strBut)
 lib2d_but_postext (strBut)
 lib2d_butBuild (strBut)
 Build the button.
 lib2d_butbuildbitmap (strBut)
 lib2d_butClose (strBut)
 Close a button.
 lib2d_butDestroy (strBut)
 Destroy a button.
 lib2d_butDisable (strBut)
 Disable (hide) a button.
 lib2d_butEnable (strBut)
 Enable (show) a button.
 lib2d_butGetBgColor (strBut)
 Retreive the background color.
 lib2d_butGetBgParams (strBut)
 Get the background parameters of the button.
 lib2d_butGetBitmap (strBut)
 Return the bitmap object to a button object.
 lib2d_butGetBitmapPos (strBut)
 Get the bitmap position of a button object.
 lib2d_butGetBitmapSize (strBut)
 Get the bitmap size of a button object.
 lib2d_butGetCbClick (strBut)
 Get the "Click" event callback to a button object.
 lib2d_butGetCbClose (strBut)
 Get the "Close" event callback to a button object.
 lib2d_butGetCbDestroy (strBut)
 Get the "Destroy" event callback to a button object.
 lib2d_butGetCbDrop (strBut)
 Get the "drop files" callback to a button object.
 lib2d_butGetCbDropfiles (strBut)
 Get the "Drop files" event callback to a button object.
 lib2d_butGetFoColor (strBut)
 Retreive the foreground (title) color.
 lib2d_butGetFont (strBut)
 Return the useed font of a button object.
 lib2d_butGetMother (strBut)
 Get the mother window.
 lib2d_butGetPos (strBut)
 Get the position of a button object.
 lib2d_butGetSize (strBut)
 Get the size of a button object.
 lib2d_butGetTitle (strBut)
 Return the title to a button object.
 lib2d_butGetType (strBut)
 Return the type of a button object.
 lib2d_butGetWinFlag (strBut)
 Get the flags of the window button.
 lib2d_butIsEnabled (strBut)
 Return if a button is shown or hidden (enabled / disabled).
 lib2d_butNew (iType, oMother, cbClick)
 Create a new object.
 lib2d_butSetBgColor (strBut, color)
 Set the background color.
 lib2d_butSetBgParams (strBut, b, fullbg, border, sizeborder)
 Set the background parameters of the button.
 lib2d_butSetBitmap (strBut, bmp)
 Set a bitmap object to a button object.
 lib2d_butSetBitmapPos (strBut, x, y)
 Set the bitmap position of a button object.
 lib2d_butSetBitmapSize (strBut, width, height)
 Set the bitmap size of a button object.
 lib2d_butSetCbClick (strBut, cb)
 Set the callback when a 'Click' event occurs.
 lib2d_butSetCbClose (strBut, cb)
 Set the callback when a 'Close' event occurs.
 lib2d_butSetCbDestroy (strBut, cb)
 Set the callback when a 'Destroy' event occurs.
 lib2d_butSetCbDrop (strBut, cb)
 Define the "drop files" callback to a button object.
 lib2d_butSetCbDropfiles (strBut, cb)
 Set the callback when a 'Drop files' event occurs.
 lib2d_butSetFile (strBut, szPath)
 Set a bitmap file to a button object.
 lib2d_butSetFoColor (strBut, color)
 Set the foreground color, i.e. the title color.
 lib2d_butSetFont (strBut, oFont)
 Set the used font to a button object.
 lib2d_butSetMother (strBut, mother)
 Set the mother window to a button object.
 lib2d_butSetPos (strBut, x, y)
 Set the position of a button object.
 lib2d_butSetSize (strBut, width, height)
 Set the size of a button object.
 lib2d_butSetTitle (strBut, szTitle)
 Set a title to a button object.
 lib2d_butSetType (strBut, iType)
 Set the type to a button object.
 lib2d_butSetWinFlag (strBut, flags)
 Set the flags of the window button.
 lib2d_button_fontdefault ()
 lib2d_buttonNewCopy (strBut)
 Create a new object from another one.
 lib2s_butGetSpacing (strBut)
 Get the spacing between the graphical elements.
 lib2s_butGetTextPos (strBut)
 Get the text position of a button object.
 lib2s_butSetSpacing (strBut, spacing)
 Set the spacing between the graphical elements.
 lib2s_butSetTextPos (strBut, pos, ref)
 From the bitmap, set the text position of a button object. If it is no bitmap, the position is from the edge of the window.

Variables

var L2D_BUTTON_BUTTON = 1
 button is a button
var L2D_BUTTON_DISABLE = 0
var L2D_BUTTON_ENABLE = 1
var L2D_BUTTON_POSABSOLUTE = 0
var L2D_BUTTON_POSRELATIVE = 1
var L2D_BUTTON_SPACING = 10
 default spacing value between the graphical elements
var L2D_BUTTON_TEXTBOTTTOM = 2
var L2D_BUTTON_TEXTLEFT = 4
var L2D_BUTTON_TEXTRIGHT = 1
var L2D_BUTTON_TEXTTOP = 0
var L2D_BUTTON_WINDOW = 0
 button is a window
proto lib2d_but_cbclick = fun [u0 L2D_BUTTON I I I] I
proto lib2d_but_cbclick2 = fun [u0 L2D_BUTTON] I
proto lib2d_but_cbdestroy = fun [u0 L2D_BUTTON] I
proto lib2d_but_cbdrop = fun [u0 L2D_BUTTON I I [P r1]] I
proto lib2d_but_cbpaint = fun [u0 L2D_BUTTON] I
proto lib2d_but_destroy = fun [L2D_BUTTON] I
proto lib2d_but_postext = fun [L2D_BUTTON] [I I]
proto lib2d_butbuildbitmap = fun [L2D_BUTTON] I

Detailed Description

Customized buttons API.

Author
Scol team
Version
0.1