Project

General

Profile

Scol standard library package  0.3.1
Common and usefull functions for all Scol applications

Classes

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

Functions

 _ADDbrowseTextContent (bt, szAddContent)
 Add (append) a content to the text field.
 _BUILDbrowseTextDialog (bt, dlgType, initPath, initName, filter)
 Build a predefined dialog box to a BrowseText control.
 _CBbrowseTextChanged (bt, cbfun, uparam)
 Define the content changed event callback to the text field of a BrowseText control.
 _CBbrowseTextClick (bt, cbfun, uparam)
 Define the click event callback to a BrowseText control.
 _CBbrowseTextClose (bt, cbfun, uparam)
 Define the close event callback to a BrowseText control.
 _CBbrowseTextDestroy (bt, cbfun, uparam)
 Define the destroy event callback to a BrowseText control.
 _CBbrowseTextDialogDir (bt, cbfun)
 Define the open directory dialog event callback to a BrowseText control.
 _CBbrowseTextDialogOpen (bt, cbfun)
 Define the open single file dialog event callback to a BrowseText control.
 _CBbrowseTextDialogOpenMulti (bt, cbfun)
 Define the open multi file dialog event callback to a BrowseText control.
 _CBbrowseTextDialogSave (bt, cbfun)
 Define the save file dialog event callback to a BrowseText control.
 _CBbrowseTextDragDrop (bt, cbfun, uparam)
 Define the drag & drop event callback to a BrowseText control.
 _CBbrowseTextLineOk (bt, cbfun, uparam)
 Define the key return pushed event callback to the text field of a BrowseText control.
 _CBbrowseTextMove (bt, cbfun, uparam)
 Define the move event callback to a BrowseText control.
 _CBbrowseTextPaint (bt, cbfun, uparam)
 Define the paint event callback to a BrowseText control.
 _CBbrowseTextSize (bt, cbfun, uparam)
 Define the resize event callback to a BrowseText control.
 _CRbrowseTextMulti (chn, mother, x, y, w, h)
 Create a default multi-line browseText.
 _CRbrowseTextMultiEx (chn, mother, x, y, w, h, flags, leftButton)
 Create a multi-line browseText.
 _CRbrowseTextSingle (chn, mother, x, y, w, h)
 Create a default browseText with a single line.
 _CRbrowseTextSingleEx (chn, mother, x, y, w, h, flags, leftButton)
 Create a browseText with a single line.
 _DSbrowseText (bt)
 Destroy a browseText control.
 _ENbrowseText (bt, flag)
 Enable or Disable a BrowseText control.
 _ENbrowseTextButton (bt, state)
 Enable or Disable the button of a BrowseText control.
 _ENbrowseTextText (bt, state)
 Enable or Disable the text field of a BrowseText control.
 _GETbrowseTextButtonBitmap (bt)
 Return the current ObjBitmap button of a BrowseText control.
 _GETbrowseTextButtonCoord (bt)
 Return the current position and size of the button of a BrowseText control.
 _GETbrowseTextContent (bt)
 Return the current text in the BrowseText.
 _GETbrowseTextContentLine (bt, iNumber)
 Return the content of a line from a text of a BrowseText control.
 _GETbrowseTextEnabled (bt)
 Return the current state of a BrowseText control.
 _GETbrowseTextFirstLine (bt)
 Return the number of the first visible text line of a BrowseText control.
 _GETbrowseTextFont (bt)
 Return the current font object used by the BrowseText.
 _GETbrowseTextFontName (bt)
 Return the current font name used by the BrowseText.
 _GETbrowseTextLines (bt)
 Return the number of lines from a text of a BrowseText control.
 _GETbrowseTextPosition (bt)
 Return the current position of a BrowseText control in its parent window.
 _GETbrowseTextShown (bt)
 Return if a BrowseText control is shown or hidden.
 _GETbrowseTextSize (bt)
 Return the current size of a BrowseText control.
 _GETbrowseTextSizeButton (bt)
 Return the current button size of a BrowseText control.
 _GETbrowseTextSizeMax (bt)
 Return the current maxi size of a BrowseText control.
 _GETbrowseTextSizeMaxDefault ()
 Return the current maxi absolute size of a BrowseText control.
 _GETbrowseTextSizeMin (bt)
 Return the current mini size of a BrowseText control.
 _GETbrowseTextSizeMinDefault ()
 Return the current mini absolute size of a BrowseText control.
 _GETbrowseTextTextCoord (bt)
 Return the current position and size of the text field of a BrowseText control.
 _GETbrowseTextTip (bt)
 Return the current button tip of a BrowseText control.
 _GETbrowseTextTitle (bt)
 Return the current title of the button inside the BrowseText.
 _MOVEbrowseText (bt, newx, newy)
 Move a BrowseText control in its parent window.
 _REBUILDbrowseText (bt)
 Rebuild a browseText.
 _REMOVEbrowseTextLine (bt, iNumber)
 Remove a line in the text of a BrowseText control.
 _SCROLLbrowseText (bt, iColumn, iLine)
 Perform a scrolling to the character defined by its colummn and line coordinates from a text of a BrowseText control.
 _SCROLLbrowseTextV (bt, iLine)
 Perform a scrolling to the line defined by its number from a text of a BrowseText control.
 _SETbrowseTextButtonBitmap (bt, oBmp)
 Display a bitmap instead of the title in the button of a BrowseText control.
 _SETbrowseTextContent (bt, szNewContent)
 (Re)Define a new content to the text field
 _SETbrowseTextFirstLine (bt, iLine)
 Set the number of the first visible line from a text of a BrowseText control.
 _SETbrowseTextFont (bt, font)
 Set a font object to the control (the text field and the button)
 _SETbrowseTextFontName (bt, szFont, iSize, iRotation, iFlag)
 Define a new font to the control (the text field and the button)
 _SETbrowseTextSizeMax (bt, maxw, mawh)
 Set the maximale size to a BrowseText control.
 _SETbrowseTextSizeMin (bt, minw, minh)
 Set the minimale size to a BrowseText control.
 _SETbrowseTextTip (bt, szTip)
 Display a 'tip' on the button of a BrowseText control.
 _SETbrowseTextTitle (bt, szNewTitle)
 Define the title of the button inside the BrowseText.
 _SHOWbrowseText (bt, state)
 Define if a BrowseText control is shown or hide.
 _SIZEbrowseText (bt, neww, newh)
 Set a new size to a BrowseText control.
 _SIZEbrowseTextButton (bt, buttonSizeW, buttonSizeH)
 Set the size to the button of a BrowseText control.
 BT_AHSCROLL ()
 Constante : allow horizontal scrolling in the text field.
 BT_ALIGN_CENTER ()
 Constante : set the center alignement in the text field.
 BT_ALIGN_LEFT ()
 Constante : set the left alignement in the text field.
 BT_ALIGN_RIGHT ()
 Constante : set the right alignement in the text field.
 BT_AVSCROLL ()
 Constante : allow vertical scrolling in the text field.
 BT_BORDER ()
 Constante : display a border around the text field.
 BT_DISABLE ()
 Constante : disable the browserText.
 BT_DOWN ()
 Constante : display a 3d border around the text field.
 BT_DRAGDROP ()
 Constante : allow drag and drop inside the browserText.
 BT_ENABLE ()
 Constante : enable the browserText.
 BT_HIDDEN ()
 Constante : hide the browseText when creating.
 BT_HIDE ()
 Constante : hide the browserText.
 BT_HSCROLL ()
 Constante : display horizontal scroll box in the text field.
 BT_LOWERCASE ()
 Constante : set the lower case content in the text field.
 BT_NOEDITABLE ()
 Constante : set the text field no editable.
 BT_NUMBER ()
 Constante : set the text field to only numbers.
 BT_PASSWORD ()
 Constante : set the text field as a password field (display only '*')
 BT_SHOW ()
 Constante : show the browserText.
 BT_VSCROLL ()
 Constante : display vertical scroll box in the text field.

Variables

var BT_MAXSIZE = 9999
 Maximum fixed size for a browserText. By default, it is 9999 pixels.
var BT_MINSIZE = 1
 Minimum fixed size for a browserText. By default, it is 1 pixels.

Detailed Description

A browseText has a text and a button fields

Package to load : lib/2dos/browseText.pkg

browsetext.png

Function Documentation

BT_AHSCROLL ( )

Constante : allow horizontal scrolling in the text field.

Prototype : fun [ ] I

See Also
_CRbrowseTextSingle
_CRbrowseTextSingleEx
_CRbrowseTextMulti
_CRbrowseTextMultiEx
Returns
I : always the same constante. Never use its numeric value instead.
BT_HSCROLL ( )

Constante : display horizontal scroll box in the text field.

Prototype : fun [ ] I

See Also
_CRbrowseTextSingle
_CRbrowseTextSingleEx
_CRbrowseTextMulti
_CRbrowseTextMultiEx
Returns
I : always the same constante. Never use its numeric value instead.
BT_AVSCROLL ( )

Constante : allow vertical scrolling in the text field.

Prototype : fun [ ] I

See Also
_CRbrowseTextSingle
_CRbrowseTextSingleEx
_CRbrowseTextMulti
_CRbrowseTextMultiEx
Returns
I : always the same constante. Never use its numeric value instead.
BT_VSCROLL ( )

Constante : display vertical scroll box in the text field.

Prototype : fun [ ] I

See Also
_CRbrowseTextSingle
_CRbrowseTextSingleEx
_CRbrowseTextMulti
_CRbrowseTextMultiEx
Returns
I : always the same constante. Never use its numeric value instead.
BT_ALIGN_CENTER ( )

Constante : set the center alignement in the text field.

Prototype : fun [ ] I

See Also
_CRbrowseTextSingle
_CRbrowseTextSingleEx
_CRbrowseTextMulti
_CRbrowseTextMultiEx
Returns
I : always the same constante. Never use its numeric value instead.
BT_ALIGN_LEFT ( )

Constante : set the left alignement in the text field.

Prototype : fun [ ] I

See Also
_CRbrowseTextSingle
_CRbrowseTextSingleEx
_CRbrowseTextMulti
_CRbrowseTextMultiEx
Returns
I : always the same constante. Never use its numeric value instead.
BT_ALIGN_RIGHT ( )

Constante : set the right alignement in the text field.

Prototype : fun [ ] I

See Also
_CRbrowseTextSingle
_CRbrowseTextSingleEx
_CRbrowseTextMulti
_CRbrowseTextMultiEx
Returns
I : always the same constante. Never use its numeric value instead.
BT_BORDER ( )

Constante : display a border around the text field.

Prototype : fun [ ] I

See Also
_CRbrowseTextSingle
_CRbrowseTextSingleEx
_CRbrowseTextMulti
_CRbrowseTextMultiEx
Returns
I : always the same constante. Never use its numeric value instead.
BT_DOWN ( )

Constante : display a 3d border around the text field.

Prototype : fun [ ] I

See Also
_CRbrowseTextSingle
_CRbrowseTextSingleEx
_CRbrowseTextMulti
_CRbrowseTextMultiEx
Returns
I : always the same constante. Never use its numeric value instead.
BT_HIDDEN ( )

Constante : hide the browseText when creating.

Prototype : fun [ ] I

See Also
_CRbrowseTextSingle
_CRbrowseTextSingleEx
_CRbrowseTextMulti
_CRbrowseTextMultiEx
Returns
I : always the same constante. Never use its numeric value instead.
BT_LOWERCASE ( )

Constante : set the lower case content in the text field.

Prototype : fun [ ] I

See Also
_CRbrowseTextSingle
_CRbrowseTextSingleEx
_CRbrowseTextMulti
_CRbrowseTextMultiEx
Returns
I : always the same constante. Never use its numeric value instead.
BT_NOEDITABLE ( )

Constante : set the text field no editable.

Prototype : fun [ ] I

See Also
_CRbrowseTextSingle
_CRbrowseTextSingleEx
_CRbrowseTextMulti
_CRbrowseTextMultiEx
Returns
I : always the same constante. Never use its numeric value instead.
BT_PASSWORD ( )

Constante : set the text field as a password field (display only '*')

Prototype : fun [ ] I

See Also
_CRbrowseTextSingle
_CRbrowseTextSingleEx
_CRbrowseTextMulti
_CRbrowseTextMultiEx
Returns
I : always the same constante. Never use its numeric value instead.
BT_NUMBER ( )

Constante : set the text field to only numbers.

Prototype : fun [ ] I

See Also
_CRbrowseTextSingle
_CRbrowseTextSingleEx
_CRbrowseTextMulti
_CRbrowseTextMultiEx
Returns
I : always the same constante. Never use its numeric value instead.
BT_DRAGDROP ( )

Constante : allow drag and drop inside the browserText.

Prototype : fun [ ] I

See Also
_CRbrowseTextSingle
_CRbrowseTextSingleEx
_CRbrowseTextMulti
_CRbrowseTextMultiEx
Returns
I : always the same constante. Never use its numeric value instead.
BT_ENABLE ( )

Constante : enable the browserText.

Prototype : fun [ ] I

See Also
_ENbrowseText
Returns
I : always the same constante. Never use its numeric value instead.
BT_DISABLE ( )

Constante : disable the browserText.

Prototype : fun [ ] I

See Also
_ENbrowseText
Returns
I : always the same constante. Never use its numeric value instead.
BT_SHOW ( )

Constante : show the browserText.

Prototype : fun [ ] I

See Also
_SHOWbrowseText
Returns
I : always the same constante. Never use its numeric value instead.
BT_HIDE ( )

Constante : hide the browserText.

Prototype : fun [ ] I

See Also
_SHOWbrowseText
Returns
I : always the same constante. Never use its numeric value instead.
_CRbrowseTextSingle ( chn  ,
mother  ,
,
,
,
 
)

Create a default browseText with a single line.

Prototype : fun [Chn ObjWin I I I I] BrowseText

See Also
_CRbrowseTextSingleEx
Parameters
Chn: the channel where the browserText is created
ObjWin: the parent window (should not be nil)
I: the X coordinate
I: the Y coordinate
I: the width
I: the height
Returns
BrowseText : The new BrowseText object or nil if an error occurs
_CRbrowseTextSingleEx ( chn  ,
mother  ,
,
,
,
,
flags  ,
leftButton   
)

Create a browseText with a single line.

Prototype : fun [Chn ObjWin I I I I I I] BrowseText

See Also
_CRbrowseTextSingle
Parameters
Chn: the channel where the browserText is created
ObjWin: the parent window (should not be nil)
I: the X coordinate
I: the Y coordinate
I: the width
I: the height
I: a combinaison of these available flags :
  • BT_AHSCROLL
  • BT_HSCROLL
  • BT_AVSCROLL
  • BT_VSCROLL
  • BT_ALIGN_CENTER
  • BT_ALIGN_LEFT
  • BT_ALIGN_RIGHT
  • BT_BORDER
  • BT_DOWN
  • BT_HIDDEN
  • BT_LOWERCASE
  • BT_NOEDITABLE
  • BT_PASSWORD
  • BT_NUMBER
  • BT_DRAGDROP
I: define if the button is at left (1) or at right (0)
Returns
BrowseText : The new BrowseText object or nil if an error occurs
_CRbrowseTextMulti ( chn  ,
mother  ,
,
,
,
 
)

Create a default multi-line browseText.

Prototype : fun [Chn ObjWin I I I I] BrowseText

See Also
_CRbrowseTextMultiEx
Parameters
Chn: the channel where the browserText is created
ObjWin: the parent window (should not be nil)
I: the X coordinate
I: the Y coordinate
I: the width
I: the height
Returns
BrowseText : The new BrowseText object or nil if an error occurs
_CRbrowseTextMultiEx ( chn  ,
mother  ,
,
,
,
,
flags  ,
leftButton   
)

Create a multi-line browseText.

Prototype : fun [Chn ObjWin I I I I I I] BrowseText

See Also
_CRbrowseTextMulti
Parameters
Chn: the channel where the browserText is created
ObjWin: the parent window (should not be nil)
I: the X coordinate
I: the Y coordinate
I: the width
I: the height
I: a combinaison of these available flags :
  • BT_AHSCROLL
  • BT_HSCROLL
  • BT_AVSCROLL
  • BT_VSCROLL
  • BT_ALIGN_CENTER
  • BT_ALIGN_LEFT
  • BT_ALIGN_RIGHT
  • BT_BORDER
  • BT_DOWN
  • BT_HIDDEN
  • BT_LOWERCASE
  • BT_NOEDITABLE
  • BT_PASSWORD
  • BT_NUMBER
  • BT_DRAGDROP
I: define if the button is at left (1) or at right (0)
Returns
BrowseText : The new BrowseText object or nil if an error occurs
_REBUILDbrowseText ( bt  )

Rebuild a browseText.

Prototype : fun [BrowseText] BrowseText

The 'close' and 'destroy' callback can be called during this event.

Parameters
BrowseText: a BrowseText object
Returns
BrowseText : The same BrowseText object or nil if an error occurs
_DSbrowseText ( bt  )

Destroy a browseText control.

It should be explicitely destroyed by this function, especially if a bitmap button is displayed.

See Also
_SETbrowseTextButtonBitmap

Prototype : fun [BrowseText] I

Parameters
BrowseText: a BrowseText object
Returns
BrowseText : Always 0.
_SETbrowseTextTitle ( bt  ,
szNewTitle   
)

Define the title of the button inside the BrowseText.

Prototype : fun [BrowseText S] BrowseText

If the previous button was a bitmap button, it will be destroyed and a new button will be created. It is not need to set the callbacks again. It is not also need to rebuild the object.

Parameters
BrowseText: a BrowseText object
S: the new title
See Also
_SETbrowseTextButtonBitmap
Returns
BrowseText : The same BrowseText object
_GETbrowseTextTitle ( bt  )

Return the current title of the button inside the BrowseText.

Prototype : fun [BrowseText] S

Parameters
BrowseText: a BrowseText object
Returns
S : The title
_SETbrowseTextFont ( bt  ,
font   
)

Set a font object to the control (the text field and the button)

It is not required to rebuild the control after that.

Prototype : fun [BrowseText ObjFont] BrowseText

Parameters
BrowseText: a BrowseText object
ObjFont: a font object already created
Returns
BrowseText : The same BrowseText object
_GETbrowseTextFont ( bt  )

Return the current font object used by the BrowseText.

Prototype : fun [BrowseText] ObjFont

Parameters
BrowseText: a BrowseText object
Returns
ObjFont : The current font object
_SETbrowseTextFontName ( bt  ,
szFont  ,
iSize  ,
iRotation  ,
iFlag   
)

Define a new font to the control (the text field and the button)

It is not required to rebuild the control after that.

Prototype : fun [BrowseText S I I I] BrowseText

Parameters
BrowseText: a BrowseText object
S: a font name. It should be already installed in the system.
I: the font size
I: the rotation to apply to the font
I: a flag :
  • FF_WEIGHT
  • FF_ITALIC
  • FF_UNDERLINE
  • FF_STRIKED
  • FF_PIXEL
  • FF_HOLLOW
  • FF_CLEARTYPE

See _CRfont in the Scol documentation for more explanations about these parameters.

Returns
BrowseText : The same BrowseText object or nil if error (typically a bad font name)
_GETbrowseTextFontName ( bt  )

Return the current font name used by the BrowseText.

If a font is set by _SETbrowseTextFont the returned name might be wrong.

Prototype : fun [BrowseText] S

Parameters
BrowseText: a BrowseText object
Returns
S : the font name
_SETbrowseTextContent ( bt  ,
szNewContent   
)

(Re)Define a new content to the text field

The previous content will be lost. To set empty, the parameter could be "" or nil.

Prototype : fun [BrowseText S] BrowseText

Parameters
BrowseText: a BrowseText object
S: a new content.
Returns
BrowseText : The same BrowseText object or nil if error
_GETbrowseTextContent ( bt  )

Return the current text in the BrowseText.

Prototype : fun [BrowseText] S

Parameters
BrowseText: a BrowseText object
Returns
S : the content
_ADDbrowseTextContent ( bt  ,
szAddContent   
)

Add (append) a content to the text field.

The previous content will not be lost.

Prototype : fun [BrowseText S] BrowseText

Parameters
BrowseText: a BrowseText object
S: a content to append.
Returns
BrowseText : The same BrowseText object or nil if error
_SIZEbrowseText ( bt  ,
neww  ,
newh   
)

Set a new size to a BrowseText control.

Prototype : fun [BrowseText I I] BrowseText

Parameters
BrowseText: a BrowseText object
I: a new width.
I: a new height
See Also
_SETbrowseTextSizeMax
_SETbrowseTextSizeMin
Returns
BrowseText : The same BrowseText object or nil if error
_MOVEbrowseText ( bt  ,
newx  ,
newy   
)

Move a BrowseText control in its parent window.

If one coordinate is nil, it will be unchanged.

Prototype : fun [BrowseText I I] BrowseText

Parameters
BrowseText: a BrowseText object
I: a new x coordinate.
I: a new y coordinate.
Returns
BrowseText : The same BrowseText object or nil if error
_ENbrowseText ( bt  ,
flag   
)

Enable or Disable a BrowseText control.

Prototype : fun [BrowseText I] BrowseText

Parameters
BrowseText: a BrowseText object
I: the new state : BT_ENABLE or BT_DISABLE. Other value is ignored.
Returns
BrowseText : The same BrowseText object or nil if error
_GETbrowseTextEnabled ( bt  )

Return the current state of a BrowseText control.

Prototype : fun [BrowseText] I

Parameters
BrowseText: a BrowseText object
Returns
I : the current state (BT_ENABLE or BT_DISABLE).
_GETbrowseTextPosition ( bt  )

Return the current position of a BrowseText control in its parent window.

Prototype : fun [BrowseText] [I I]

Parameters
BrowseText: a BrowseText object
Returns
[I I] : the current x and y coordinates.
_GETbrowseTextSize ( bt  )

Return the current size of a BrowseText control.

Prototype : fun [BrowseText] [I I]

Parameters
BrowseText: a BrowseText object
Returns
[I I] : the current width and the height.
_GETbrowseTextSizeMaxDefault ( )

Return the current maxi absolute size of a BrowseText control.

Prototype : fun [BrowseText] I

Parameters
BrowseText: a BrowseText object
Returns
I : the current maxi absolute size.
_GETbrowseTextSizeMinDefault ( )

Return the current mini absolute size of a BrowseText control.

Prototype : fun [BrowseText] I

Parameters
BrowseText: a BrowseText object
Returns
I : the current mini absolute size.
_SETbrowseTextSizeMax ( bt  ,
maxw  ,
mawh   
)

Set the maximale size to a BrowseText control.

Each value can not be greater than the value returned by _GETbrowseTextSizeMaxDefault and lesser than the returned value by _GETbrowseTextSizeMinDefault. Otherwise if greater, the maxi(mini) absolute value will be set instead.

Prototype : fun [BrowseText I I] BrowseText

Parameters
BrowseText: a BrowseText object
I: a maxi width.
I: a maxi height.
See Also
_SIZEbrowseText
_SETbrowseTextSizeMin
_GETbrowseTextSizeMaxDefault
_GETbrowseTextSizeMinDefault
Returns
BrowseText : The same BrowseText object or nil if error
_SETbrowseTextSizeMin ( bt  ,
minw  ,
minh   
)

Set the minimale size to a BrowseText control.

Each value can not be greater than the value returned by _GETbrowseTextSizeMaxDefault and lesser than the returned value by _GETbrowseTextSizeMinDefault. Otherwise if greater, the maxi(mini) absolute value will be set instead.

Prototype : fun [BrowseText I I] BrowseText

Parameters
BrowseText: a BrowseText object
I: a mini width.
I: a mini height.
See Also
_SIZEbrowseText
_SETbrowseTextSizeMax
_GETbrowseTextSizeMaxDefault
_GETbrowseTextSizeMinDefault
Returns
BrowseText : The same BrowseText object or nil if error
_GETbrowseTextSizeMax ( bt  )

Return the current maxi size of a BrowseText control.

Prototype : fun [BrowseText] [I I]

Parameters
BrowseText: a BrowseText object
Returns
[I I] : the current maxi size.
_GETbrowseTextSizeMin ( bt  )

Return the current mini size of a BrowseText control.

Prototype : fun [BrowseText] [I I]

Parameters
BrowseText: a BrowseText object
Returns
[I I] : the current mini size.
_SHOWbrowseText ( bt  ,
state   
)

Define if a BrowseText control is shown or hide.

Prototype : fun [BrowseText I] BrowseText

Parameters
BrowseText: a BrowseText object
I: a flag
  • BT_SHOW
  • BT_HIDE
  • another value will be ignored.
Returns
BrowseText : The same BrowseText object
_GETbrowseTextShown ( bt  )

Return if a BrowseText control is shown or hidden.

Prototype : fun [BrowseText] I

Parameters
BrowseText: a BrowseText object
Returns
I : the current state : BT_SHOW or BT_HIDE (nil if no control)
_SIZEbrowseTextButton ( bt  ,
buttonSizeW  ,
buttonSizeH   
)

Set the size to the button of a BrowseText control.

The button size can not be greater than the size of the BrowseText control itself.

Prototype : fun [BrowseText [I I]] BrowseText

Parameters
BrowseText: a BrowseText object
[II] : the width and the height.
See Also
_SIZEbrowseText
Returns
BrowseText : The same BrowseText object
_GETbrowseTextSizeButton ( bt  )

Return the current button size of a BrowseText control.

Prototype : fun [BrowseText] [I I]

Parameters
BrowseText: a BrowseText object
Returns
[I I] : this size.
_SETbrowseTextButtonBitmap ( bt  ,
oBmp   
)

Display a bitmap instead of the title in the button of a BrowseText control.

The given ObjBitmap is internally copied. So, it can be destroyed. The internal Bitmap object will be automatically destroyed when the control object is destroyed or a button title is set.

To remove this, you can set 'nil' or define a title string.

Prototype : fun [BrowseText ObjBitmap] BrowseText

Parameters
BrowseText: a BrowseText object
ObjBitmap: an ObjBitmap already created or nil to remove the previous bitmap.
See Also
_SETbrowseTextTitle
Returns
BrowseText : The same BrowseText object
_GETbrowseTextButtonBitmap ( bt  )

Return the current ObjBitmap button of a BrowseText control.

Prototype : fun [BrowseText] ObjBitmap

Parameters
BrowseText: a BrowseText object
Returns
ObjBitmap : this bitmap or nil if no bitmap displayed.
_ENbrowseTextButton ( bt  ,
state   
)

Enable or Disable the button of a BrowseText control.

Prototype : fun [BrowseText I] BrowseText

Parameters
BrowseText: a BrowseText object
I: the new state : BT_ENABLE or BT_DISABLE. Other value is ignored.
Returns
BrowseText : The same BrowseText object or nil if error
_ENbrowseTextText ( bt  ,
state   
)

Enable or Disable the text field of a BrowseText control.

Prototype : fun [BrowseText I] BrowseText

Parameters
BrowseText: a BrowseText object
I: the new state : BT_ENABLE or BT_DISABLE. Other value is ignored.
Returns
BrowseText : The same BrowseText object or nil if error
_GETbrowseTextButtonCoord ( bt  )

Return the current position and size of the button of a BrowseText control.

Prototype : fun [BrowseText] [I I I I]

See Also
_GETbrowseTextSize
_GETbrowseTextPosition
Parameters
BrowseText: a BrowseText object
Returns
[I I I I] : x coordinate, y coordinate, width, height.
_GETbrowseTextTextCoord ( bt  )

Return the current position and size of the text field of a BrowseText control.

Prototype : fun [BrowseText] [I I I I]

See Also
_GETbrowseTextSize
_GETbrowseTextPosition
Parameters
BrowseText: a BrowseText object
Returns
[I I I I] : x coordinate, y coordinate, width, height.
_SETbrowseTextTip ( bt  ,
szTip   
)

Display a 'tip' on the button of a BrowseText control.

Prototype : fun [BrowseText S] BrowseText

Parameters
BrowseText: a BrowseText object
S: a string
Bug:
the tip can not to appear on the screen. Check that !
Returns
BrowseText : The same BrowseText object
_GETbrowseTextTip ( bt  )

Return the current button tip of a BrowseText control.

Prototype : fun [BrowseText] S

Parameters
BrowseText: a BrowseText object
Returns
S : this tip
_REMOVEbrowseTextLine ( bt  ,
iNumber   
)

Remove a line in the text of a BrowseText control.

Prototype : fun [BrowseText I] BrowseText

Parameters
BrowseText: a BrowseText object
I: a number line (0 is the first line).
Returns
BrowseText : The same BrowseText object
_GETbrowseTextFirstLine ( bt  )

Return the number of the first visible text line of a BrowseText control.

Prototype : fun [BrowseText] I

Parameters
BrowseText: a BrowseText object
Returns
I : this number line, can be different from 0 if the text field is scrolled.
_SETbrowseTextFirstLine ( bt  ,
iLine   
)

Set the number of the first visible line from a text of a BrowseText control.

Prototype : fun [BrowseText I] BrowseText

Parameters
BrowseText: a BrowseText object
I: the number line
Returns
BrowseText : The same BrowseText object.
_GETbrowseTextContentLine ( bt  ,
iNumber   
)

Return the content of a line from a text of a BrowseText control.

Prototype : fun [BrowseText] S

Parameters
BrowseText: a BrowseText object
Returns
S : this content.
_GETbrowseTextLines ( bt  )

Return the number of lines from a text of a BrowseText control.

Prototype : fun [BrowseText] I

Parameters
BrowseText: a BrowseText object
Returns
I : this number.
_SCROLLbrowseText ( bt  ,
iColumn  ,
iLine   
)

Perform a scrolling to the character defined by its colummn and line coordinates from a text of a BrowseText control.

Prototype : fun [BrowseText I I] BrowseText

Parameters
BrowseText: a BrowseText object
I: the column number
I: the line number
Returns
BrowseText : The same BrowseText object.
_SCROLLbrowseTextV ( bt  ,
iLine   
)

Perform a scrolling to the line defined by its number from a text of a BrowseText control.

See Also
_SETbrowseTextFirstLine

Prototype : fun [BrowseText I] BrowseText

Parameters
BrowseText: a BrowseText object
I: the line number
Returns
BrowseText : The same BrowseText object.
_CBbrowseTextClick ( bt  ,
cbfun  ,
uparam   
)

Define the click event callback to a BrowseText control.

Prototype : fun [BrowseText fun [BrowseText u0] u1 u0] BrowseText

Parameters
BrowseText: a BrowseText object
fun[BrowseText u0] u1 : the callback
u0: an user parameter, at your convenience
Returns
BrowseText : The same BrowseText object.
Todo:
event click on the text field
_CBbrowseTextDragDrop ( bt  ,
cbfun  ,
uparam   
)

Define the drag & drop event callback to a BrowseText control.

Prototype : fun [BrowseText fun [BrowseText u0 [P r1]] u1 u0] BrowseText

Parameters
BrowseText: a BrowseText object
fun[BrowseText u0 [P r1]] u1 : the callback. The supplemental argument is the list of read-reference files
u0: an user parameter, at your convenience
Returns
BrowseText : The same BrowseText object.
Remarks
The flag BT_DRAGDROP must be set when the control is created.
See Also
BT_DRAGDROP
_CBbrowseTextLineOk ( bt  ,
cbfun  ,
uparam   
)

Define the key return pushed event callback to the text field of a BrowseText control.

Prototype : fun [BrowseText fun [BrowseText u0 S] u1 u0] BrowseText

Parameters
BrowseText: a BrowseText object
fun[BrowseText u0 S] u1 : the callback. The supplemental argument is the current content
u0: an user parameter, at your convenience
Returns
BrowseText : The same BrowseText object.
_CBbrowseTextChanged ( bt  ,
cbfun  ,
uparam   
)

Define the content changed event callback to the text field of a BrowseText control.

Prototype : fun [BrowseText fun [BrowseText u0 S] u1 u0] BrowseText

Parameters
BrowseText: a BrowseText object
fun[BrowseText u0 S] u1 : the callback. The supplemental argument is the current content
u0: an user parameter, at your convenience
Returns
BrowseText : The same BrowseText object.
_CBbrowseTextClose ( bt  ,
cbfun  ,
uparam   
)

Define the close event callback to a BrowseText control.

Prototype : fun [BrowseText fun [BrowseText u0] u1 u0] BrowseText

Parameters
BrowseText: a BrowseText object
fun[BrowseText u0] u1 : the callback.
u0: an user parameter, at your convenience
Returns
BrowseText : The same BrowseText object.
Remarks
This event occurs before the destroy event.
_CBbrowseTextDestroy ( bt  ,
cbfun  ,
uparam   
)

Define the destroy event callback to a BrowseText control.

Prototype : fun [BrowseText fun [BrowseText u0] u1 u0] BrowseText

Parameters
BrowseText: a BrowseText object
fun[BrowseText u0] u1 : the callback.
u0: an user parameter, at your convenience
Returns
BrowseText : The same BrowseText object.
_CBbrowseTextMove ( bt  ,
cbfun  ,
uparam   
)

Define the move event callback to a BrowseText control.

Prototype : fun [BrowseText fun [BrowseText u0 I I] u1 u0] BrowseText

Parameters
BrowseText: a BrowseText object
fun[BrowseText u0 I I] u1 : the callback. The supplemental arguments are the new x and the y coordinates.
u0: an user parameter, at your convenience
Returns
BrowseText : The same BrowseText object.
_CBbrowseTextSize ( bt  ,
cbfun  ,
uparam   
)

Define the resize event callback to a BrowseText control.

Prototype : fun [BrowseText fun [BrowseText u0 I I] u1 u0] BrowseText

Parameters
BrowseText: a BrowseText object
fun[BrowseText u0 I I] u1 : the callback. The supplemental arguments are the new width and height.
u0: an user parameter, at your convenience
Returns
BrowseText : The same BrowseText object.
_CBbrowseTextPaint ( bt  ,
cbfun  ,
uparam   
)

Define the paint event callback to a BrowseText control.

Prototype : fun [BrowseText fun [BrowseText u0] u1 u0] BrowseText

Parameters
BrowseText: a BrowseText object
fun[BrowseText u0] u1 : the callback.
u0: an user parameter, at your convenience
Returns
BrowseText : The same BrowseText object.
_BUILDbrowseTextDialog ( bt  ,
dlgType  ,
initPath  ,
initName  ,
filter   
)

Build a predefined dialog box to a BrowseText control.

Prototype : fun [BrowseText I S S S] BrowseText

Parameters
BrowseText: a BrowseText object
I: A flag. One of these following values :
  • BT_DLGOPENSINGLE : build a single file selection box for reading.
  • BT_DLGOPENMULTI : build a multiple file selection box for reading.
  • BT_DLGSAVE : build a file selection box for writing.
  • BT_DLGDIR : build a directory selection box.
  • Other values will be ignored and the function will return 'nil'.
S: an initial path (relative to Scol first partition). nil for root directory.
S: a default file (or directory) name. Can be nil.
S: a file name filter, such as "text\0*.txt\0ASCII\0*.asc\0All\0*.*\0\0". Do not forget the terminal double "\0". If nil then "All\0*.*\0\0".
Returns
BrowseText : The same BrowseText object.
Remarks
The callback should be defined before to build the dialog. This definition can be kept until the called function is unchanged.
See Also
_CBbrowseTextDialogOpen with BT_DLGOPENSINGLE flag
_CBbrowseTextDialogOpenMulti with BT_DLGOPENMULTI flag
_CBbrowseTextDialogSave with BT_DLGSAVE flag
_CBbrowseTextDialogDir with BT_DLGDIR flag
_CBbrowseTextDialogOpen ( bt  ,
cbfun   
)

Define the open single file dialog event callback to a BrowseText control.

Prototype : fun [BrowseText fun [BrowseText P] I] BrowseText

Parameters
BrowseText: a BrowseText object
fun[BrowseText P] I : the callback. Parameters are :

To add an user parameter, use 'mkfun3' function to obtain a callback with a prototype such as fun [BrowseText P u0] I Be carefull, this user parameter will be third argument.

See Also
_BUILDbrowseTextDialog with BT_DLGOPENSINGLE flag
Returns
BrowseText : The same BrowseText object.
_CBbrowseTextDialogOpenMulti ( bt  ,
cbfun   
)

Define the open multi file dialog event callback to a BrowseText control.

Prototype : fun [BrowseText fun [BrowseText [P r1]] I] BrowseText

Parameters
BrowseText: a BrowseText object
fun[BrowseText [P r1]] I : the callback. Parameters are :

To add an user parameter, use 'mkfun3' function to obtain a callback with a prototype such as fun [BrowseText [P r1] u0] I Be carefull, this user parameter will be third argument.

See Also
_BUILDbrowseTextDialog with BT_DLGOPENMULTI flag
Returns
BrowseText : The same BrowseText object.
_CBbrowseTextDialogSave ( bt  ,
cbfun   
)

Define the save file dialog event callback to a BrowseText control.

Prototype : fun [BrowseText fun [BrowseText W] I] BrowseText

Parameters
BrowseText: a BrowseText object
fun[BrowseText W] I : the callback. Parameters are :

To add an user parameter, use 'mkfun3' function to obtain a callback with a prototype such as fun [BrowseText W u0] I Be carefull, this user parameter will be third argument.

See Also
_BUILDbrowseTextDialog with BT_DLGSAVE flag
Returns
BrowseText : The same BrowseText object.
_CBbrowseTextDialogDir ( bt  ,
cbfun   
)

Define the open directory dialog event callback to a BrowseText control.

Prototype : fun [BrowseText fun [BrowseText S] I] BrowseText

Parameters
BrowseText: a BrowseText object
fun[BrowseText S] I : the callback. Parameters are :

To add an user parameter, use 'mkfun3' function to obtain a callback with a prototype such as fun [BrowseText S u0] I Be carefull, this user parameter will be third argument.

See Also
_BUILDbrowseTextDialog with BT_DLGDIR flag
Returns
BrowseText : The same BrowseText object.