This is Info file jptui.info, produced by Makeinfo version 1.68 from the
input file jptui.txi.

INFO-DIR-SECTION Libraries
START-INFO-DIR-ENTRY
* JPTUI: (jptui).
        Jean-Pierre Delprat's Textmode User Interface library.
END-INFO-DIR-ENTRY


File: jptui.info,  Node: TObject Enumerations,  Next: TObject Data,  Prev: TObject Derived Classes,  Up: TObject

TObject Enumerations
====================

 None.


File: jptui.info,  Node: TObject Data,  Next: TObject Instanciation,  Prev: TObject Enumerations,  Up: TObject

TObject Data
============

 None.


File: jptui.info,  Node: TObject Instanciation,  Next: TObject Static Methods,  Prev: TObject Data,  Up: TObject

TObject Instanciation
=====================


+ TObject::TObject(
    PObject parent,
    int type,
    int rel_x,int rel_y,
    int width,int height,
    unsigned background,
    char *caption,
    boolean enabled,
    boolean focus_depending_aspect,
    boolean can_be_enabled,
    boolean simple)

  Creates an object of this class.  Arguments are as follows...

  > parent

    The parent object which this one should be attached to. This can
    either be a normal object, to create complex objects, or simply the
    window to which the object should be attached. If the object has no
    parent, and is not a window, a window is dynamically created by the
    object. Thus, an object always belongs to a window (nothing can be
    displayed in JPTUI outside windows).

  > type

    A special identifier which indicates the type of object this is
    (*note Object Type Definitions::.).

  > rel_x

    The object's 'x' position, relative to the parent object's position.

  > rel_y

    The object's 'y' position, relative to the parent object's position.

  > width

    The width of the object.

  > height

    The height of the object.

  > background

    An extended character (ie, char in low byte, and VGA attributes in
    the high-byte) which specifies the character to use for the
    background.

  > caption

    The caption text to use.  This text is displayed near the object, or
    within the object for certain types.  It is normally used to name
    the object, and to inform the user of keyboard shortcuts (by
    specifying a hotkey).

    'caption' has a special string format (*note String Datatypes::.).

  > enabled

    Specifies whether the object is to be enabled or disabled (ie,
    non-selectable) when first created.  If you set this flag to TRUE
    during instanciation, you can change it dynamically though a call to
    'm_set_can_be_enabled' (see below).

  > focus_depending_aspect

    Specifies whether the object's appearance changes when it gets or
    loses the focus.  If TRUE, the object will be redrawn at these
    times.

  > can_be_enabled

    Specifies whether the object can be enabled, or not.  For example,
    some objects are only there for visual purposes, and need never be
    active, such as labels.

    Still others might need to be disabled at certain times, when they
    are not applicable.  In these cases, you need to set
    'can_be_enabled' to TRUE, and manage it with 'm_enable()',
    'm_disable()', and 'm_can_be_enabled()'.

  > simple

    Specifies that the object will have no child objects.


File: jptui.info,  Node: TObject Static Methods,  Next: TObject Access Methods,  Prev: TObject Instanciation,  Up: TObject

TObject Static Methods
======================

 None.


File: jptui.info,  Node: TObject Access Methods,  Next: TObject Callbacks,  Prev: TObject Static Methods,  Up: TObject

TObject Access Methods
======================


+ int TObject::m_get_number ()

  Returns the item's index within it's parent object.  For example...

  Object                   Number
  ----------------------------------------------------------------------
  Frame Group              1          (within the window)
  - Button                 1          (within the Frame Group)
  - Label                  2          (within the Frame Group)
  Button                   2          (within the window)

+ int TObject::m_get_type ()

  Returns a special indentifier which specifies the object's type
  (*note Object Type Definitions::.).

+ PObject TObject::m_get_parent ()

  Returns a pointer to this object's parent object.

+ PWindow TObject::m_get_window ()

  Returns a pointer to the window in which the object is displayed. This
  can be a window dynamically created when you declare an object without
  parent (menus, combo lists...).

+ int TObject::m_get_x_in_window ()

  Returns the absolute 'x' position of the object in it's window.

+ int TObject::m_get_y_in_window ()

  Returns the absolute 'y' position of the object in it's window.

+ int TObject::m_get_x ()

  Returns the 'x' position of the object relative to it's parent object.

+ int TObject::m_get_y ()

  Returns the 'y' position of the object relative to it's parent object.

+ int TObject::m_get_width ()

  Returns the object's width.

+ int TObject::m_get_height ()

  Returns the object's height.

+ void TObject::m_set_size (
    int width, int height)

  Resizes the object to 'width' by 'height'.

+ unsigned TObject::m_get_background ()

  Returns the background character (in the low-byte), and it's
  attributes (in the high-byte).

+ char* TObject::m_get_caption ()

  Returns the object's caption (*note TObject Instanciation::.).

+ void TObject::m_set_caption (
    char* caption)

  Changes the objects caption to 'caption'.
  'caption' has a special string format (*note String Datatypes::.).

  In order to change the caption of an object, this object must already
  have a caption. So, when you declare an object without caption, use
  the string " " for the 'caption' parameter if you want to change its
  caption at run-time (*note TObject Instanciation::.).

+ char TObject::m_get_hotkey ()

  Returns the object's hotkey (*note TObject Instanciation::.).

+ boolean TObject::m_is_open ()

  Returns a boolean value which indicates whether the object is
  currently open.

+ boolean TObject::m_has_focus ()

  Returns a boolean value which indicates whether the object has the
  focus (ie, whether it is the active object).

+ boolean TObject::m_is_enabled ()

  Returns a boolean value which indicates if the object is enabled
  (TRUE), or disabled (FALSE).  Disabled objects can not be used, and
  will appear to be darker, or 'ghosted'.

+ void TObject::m_enable ()

  Enables the object, making it possible for the user to interact with
  it.  The object must have the 'can_be_enabled flag' set for this to
  work (*note TObject Instanciation::.).

+ void TObject::m_disable ()

  Disables the object, making user interaction with it impossible.

+ void TObject::m_set_can_be_enabled (
    boolean mode)

  Changes the current state of the object's 'can_be_enabled' to 'mode'.
  You can only enable the object when this flag is TRUE. This function
  can only be used on objects which had their 'can_be_enabled' flag set
  during instanciation (*note TObject Instanciation::.).

+ boolean TObject::m_can_lose_focus ()

  Returns a boolean value which indicates whether the current focus can
  be taken from this object, and given to another.  If not, then other
  objects cannot be selected.


File: jptui.info,  Node: TObject Callbacks,  Next: TObject Special,  Prev: TObject Access Methods,  Up: TObject

TObject Callbacks
=================


+ void TObject::m_set_focus_lost_callback (
    void (*focus_lost_action)(TObject *,char *),
    char *focus_lost_argument)

  Sets the function to be called when this object loses the focus to
  'focus_lost_action'. The function will be called with it's first
  argument pointing to this object.  The second argument will be a copy
  of the string given for 'focus_lost_argument'.

+ void TObject::m_set_focus_taken_callback (
    void (*focus_taken_action)(TObject *,char *),
    char *focus_taken_argument)

  Sets the function to be called when this object gets the focus to
  'focus_taken_action'. The function will be called with it's first
  argument pointing to this object.  The second argument will be a copy
  of the string given for 'focus_taken_argument'.

+ void TObject::m_opened_callback (
    void (*opened_action)(TObject *,char *),
    char *opened_argument)

  Sets the function to be called when this object is opened to
  'opened_action'. The function will be called with it's first argument
  pointing to this object.  The second argument will be a copy of the
  string given for 'opened_argument'.

+ void TObject::m_closed_callback (
    void (*closed_action)(TObject *,char *),
    char *closed_argument)

  Sets the function to be called when this object is closed to
  'closed_action'. The function will be called with it's first argument
  pointing to this object.  The second argument will be a copy of the
  string given for 'closed_argument'.


File: jptui.info,  Node: TObject Special,  Next: TObject Notes,  Prev: TObject Callbacks,  Up: TObject

TObject Special
===============


+ boolean TObject::m_set_focus ()

  Sets the focus to the first element (child object) of the object, and
  activates the actual object itself.  Returns a boolean value which
  indicates success or failure.

+ boolean TObject::m_set_focus_to_last_element ()

  Sets the focus to the last element (child object).


File: jptui.info,  Node: TObject Notes,  Next: TPasswordEditZone Description,  Prev: TObject Special,  Up: TObject

TObject Notes
=============

 None.


File: jptui.info,  Node: TPasswordEditZone Description,  Next: TPasswordEditZone Base Classes,  Prev: TObject Notes,  Up: TPasswordEditZone

TPasswordEditZone Description
=============================

 This class is the same as the TEditZone class, except that each character
of the zone is displayed as a '*'.


File: jptui.info,  Node: TPasswordEditZone Base Classes,  Next: TPasswordEditZone Derived Classes,  Prev: TPasswordEditZone Description,  Up: TPasswordEditZone

TPasswordEditZone Base Classes
==============================

* Menu:

* TEditZone::


File: jptui.info,  Node: TPasswordEditZone Derived Classes,  Next: TPasswordEditZone Enumerations,  Prev: TPasswordEditZone Base Classes,  Up: TPasswordEditZone

TPasswordEditZone Derived Classes
=================================

 None.


File: jptui.info,  Node: TPasswordEditZone Enumerations,  Next: TPasswordEditZone Data,  Prev: TPasswordEditZone Derived Classes,  Up: TPasswordEditZone

TPasswordEditZone Enumerations
==============================

 None.


File: jptui.info,  Node: TPasswordEditZone Data,  Next: TPasswordEditZone Instanciation,  Prev: TPasswordEditZone Enumerations,  Up: TPasswordEditZone

TPasswordEditZone Data
======================

 None.


File: jptui.info,  Node: TPasswordEditZone Instanciation,  Next: TPasswordEditZone Static Methods,  Prev: TPasswordEditZone Data,  Up: TPasswordEditZone

TPasswordEditZone Instanciation
===============================


+ TPasswordEditZone::TPasswordEditZone (
    PObject parent,
    int rel_x,int rel_y,
    int xoffset_caption,int yoffset_caption,
    char *caption,
    int display_length,
    int max_length,
    char *string="",
    boolean enabled=TRUE)

  All the arguments here are directly-related to the arguments for the
  TEditZone constructor (*note TEditZone Instanciation::.).


File: jptui.info,  Node: TPasswordEditZone Static Methods,  Next: TPasswordEditZone Access Methods,  Prev: TPasswordEditZone Instanciation,  Up: TPasswordEditZone

TPasswordEditZone Static Methods
================================

 None.


File: jptui.info,  Node: TPasswordEditZone Access Methods,  Next: TPasswordEditZone Callbacks,  Prev: TPasswordEditZone Static Methods,  Up: TPasswordEditZone

TPasswordEditZone Access Methods
================================

 None.


File: jptui.info,  Node: TPasswordEditZone Callbacks,  Next: TPasswordEditZone Special,  Prev: TPasswordEditZone Access Methods,  Up: TPasswordEditZone

TPasswordEditZone Callbacks
===========================

 None.


File: jptui.info,  Node: TPasswordEditZone Special,  Next: TPasswordEditZone Notes,  Prev: TPasswordEditZone Callbacks,  Up: TPasswordEditZone

TPasswordEditZone Special
=========================

 None.


File: jptui.info,  Node: TPasswordEditZone Notes,  Next: TPushButton Description,  Prev: TPasswordEditZone Special,  Up: TPasswordEditZone

TPasswordEditZone Notes
=======================

 None.


File: jptui.info,  Node: TPushButton Description,  Next: TPushButton Base Classes,  Prev: TPasswordEditZone Notes,  Up: TPushButton

TPushButton Description
=======================

 This class provides capabilities for the standard textual buttons which are
essential for any visual user-interface... the ones like, "OK", "Cancel",
etc...


File: jptui.info,  Node: TPushButton Base Classes,  Next: TPushButton Derived Classes,  Prev: TPushButton Description,  Up: TPushButton

TPushButton Base Classes
========================

* Menu:

* TObject::


File: jptui.info,  Node: TPushButton Derived Classes,  Next: TPushButton Enumerations,  Prev: TPushButton Base Classes,  Up: TPushButton

TPushButton Derived Classes
===========================

 None.


File: jptui.info,  Node: TPushButton Enumerations,  Next: TPushButton Data,  Prev: TPushButton Derived Classes,  Up: TPushButton

TPushButton Enumerations
========================

 None.


File: jptui.info,  Node: TPushButton Data,  Next: TPushButton Instanciation,  Prev: TPushButton Enumerations,  Up: TPushButton

TPushButton Data
================

 None.


File: jptui.info,  Node: TPushButton Instanciation,  Next: TPushButton Static Methods,  Prev: TPushButton Data,  Up: TPushButton

TPushButton Instanciation
=========================


+ TPushButton::TPushButton (
    PObject parent,
    int rel_x,int rel_y,
    int width,
    char *caption,
    int type=PB_NORMAL,
    TShadowChoice shadows=SHC_BOTH,
    boolean enabled=TRUE)

  Creates a new TPushButton object.  All arguments are directly-related
  to the arguments by the same name in the TObject (*note TObject Instanciation::.) base class,
  except for 'type' and 'shadows'. 'type' specifies the kind of
  pushbutton you want (cf  (*note PushButton Type Definitions::.). 'shadows'
  specifies which shadows the pushbutton has (*note Shadow Definitions::.).


File: jptui.info,  Node: TPushButton Static Methods,  Next: TPushButton Access Methods,  Prev: TPushButton Instanciation,  Up: TPushButton

TPushButton Static Methods
==========================

 None.


File: jptui.info,  Node: TPushButton Access Methods,  Next: TPushButton Callbacks,  Prev: TPushButton Static Methods,  Up: TPushButton

TPushButton Access Methods
==========================

 None.


File: jptui.info,  Node: TPushButton Callbacks,  Next: TPushButton Special,  Prev: TPushButton Access Methods,  Up: TPushButton

TPushButton Callbacks
=====================


+ void TPushButton::m_set_pressed_callback (
    void (*pressed_action)(PObject,char *),
    char *pressed_argument)

  Sets the function to be called when this pushbutton is pressed to
  'pressed_action'.  The first argument passed to the function will be a
  pointer to the object, while the second is a copy of whatever string
  is given for 'pressed_argument'.


File: jptui.info,  Node: TPushButton Special,  Next: TPushButton Notes,  Prev: TPushButton Callbacks,  Up: TPushButton

TPushButton Special
===================


+ void TPushButton::m_press ()

  Presses the object, as if the user had selected it with the mouse or
  it's hotkey.  This provides a visual-confirmation that whatever the
  user wants is being done, as well as providing you with a consistant
  way of invoking the pushbutton's callback.


File: jptui.info,  Node: TPushButton Notes,  Next: TRadioButton Description,  Prev: TPushButton Special,  Up: TPushButton

TPushButton Notes
=================

 None.


File: jptui.info,  Node: TRadioButton Description,  Next: TRadioButton Base Classes,  Prev: TPushButton Notes,  Up: TRadioButton

TRadioButton Description
========================

 The TRadioButton class provides a type of button which can be toggled to
allow the user to select an option among several ones. In a group of radio
buttons, only one button is selected at one and the same time.


File: jptui.info,  Node: TRadioButton Base Classes,  Next: TRadioButton Derived Classes,  Prev: TRadioButton Description,  Up: TRadioButton

TRadioButton Base Classes
=========================

* Menu:

* TCheckBox::


File: jptui.info,  Node: TRadioButton Derived Classes,  Next: TRadioButton Enumerations,  Prev: TRadioButton Base Classes,  Up: TRadioButton

TRadioButton Derived Classes
============================

 None.


File: jptui.info,  Node: TRadioButton Enumerations,  Next: TRadioButton Data,  Prev: TRadioButton Derived Classes,  Up: TRadioButton

TRadioButton Enumerations
=========================

 None.


File: jptui.info,  Node: TRadioButton Data,  Next: TRadioButton Instanciation,  Prev: TRadioButton Enumerations,  Up: TRadioButton

TRadioButton Data
=================

 None.


File: jptui.info,  Node: TRadioButton Instanciation,  Next: TRadioButton Static Methods,  Prev: TRadioButton Data,  Up: TRadioButton

TRadioButton Instanciation
==========================


+ TRadioButton::TRadioButton (
    PRadioGroup radio_group,
    int rel_x,int rel_y,
    int width,
    char *caption,
    boolean checked=FALSE,
    boolean enabled=TRUE)

  Creates a new TRadioButton object.  All arguments are directly-related
  to the arguments by the same name in the TObject base class
  (*note TObject Instanciation::.). Just remember that the first
  argument is has been renamed to 'radio_group' instead of parent to
  emphasise that the parent must be a pointer to a TRadioGroup object.


File: jptui.info,  Node: TRadioButton Static Methods,  Next: TRadioButton Access Methods,  Prev: TRadioButton Instanciation,  Up: TRadioButton

TRadioButton Static Methods
===========================

 None.


File: jptui.info,  Node: TRadioButton Access Methods,  Next: TRadioButton Callbacks,  Prev: TRadioButton Static Methods,  Up: TRadioButton

TRadioButton Access Methods
===========================

 None.


File: jptui.info,  Node: TRadioButton Callbacks,  Next: TRadioButton Special,  Prev: TRadioButton Access Methods,  Up: TRadioButton

TRadioButton Callbacks
======================

 None.


File: jptui.info,  Node: TRadioButton Special,  Next: TRadioButton Notes,  Prev: TRadioButton Callbacks,  Up: TRadioButton

TRadioButton Special
====================


+ void TRadioButton::m_check ()
+ void TRadioButton::m_uncheck ()

  cf  (*note TCheckBox Special::.).


File: jptui.info,  Node: TRadioButton Notes,  Next: TRadioGroup Description,  Prev: TRadioButton Special,  Up: TRadioButton

TRadioButton Notes
==================

 None.


File: jptui.info,  Node: TRadioGroup Description,  Next: TRadioGroup Base Classes,  Prev: TRadioButton Notes,  Up: TRadioGroup

TRadioGroup Description
=======================

 This class provides the bounding area (via the TFrame class) and other
things required for Radio buttons.


File: jptui.info,  Node: TRadioGroup Base Classes,  Next: TRadioGroup Derived Classes,  Prev: TRadioGroup Description,  Up: TRadioGroup

TRadioGroup Base Classes
========================

* Menu:

* TFrame::


File: jptui.info,  Node: TRadioGroup Derived Classes,  Next: TRadioGroup Enumerations,  Prev: TRadioGroup Base Classes,  Up: TRadioGroup

TRadioGroup Derived Classes
===========================

 None.


File: jptui.info,  Node: TRadioGroup Enumerations,  Next: TRadioGroup Data,  Prev: TRadioGroup Derived Classes,  Up: TRadioGroup

TRadioGroup Enumerations
========================

 None.


File: jptui.info,  Node: TRadioGroup Data,  Next: TRadioGroup Instanciation,  Prev: TRadioGroup Enumerations,  Up: TRadioGroup

TRadioGroup Data
================

 None.


File: jptui.info,  Node: TRadioGroup Instanciation,  Next: TRadioGroup Static Methods,  Prev: TRadioGroup Data,  Up: TRadioGroup

TRadioGroup Instanciation
=========================


+ TRadioGroup::TRadioGroup (
    PObject parent,
    int rel_x,int rel_y,
    int width,int height,
    char *caption="",
    boolean enabled=TRUE)

  Creates a new TRadioGroup object.  All arguments are directly-related
  to the arguments for the TObject (*note TObject Instanciation::.) base class.


File: jptui.info,  Node: TRadioGroup Static Methods,  Next: TRadioGroup Access Methods,  Prev: TRadioGroup Instanciation,  Up: TRadioGroup

TRadioGroup Static Methods
==========================

 None.


File: jptui.info,  Node: TRadioGroup Access Methods,  Next: TRadioGroup Callbacks,  Prev: TRadioGroup Static Methods,  Up: TRadioGroup

TRadioGroup Access Methods
==========================

 None.


File: jptui.info,  Node: TRadioGroup Callbacks,  Next: TRadioGroup Special,  Prev: TRadioGroup Access Methods,  Up: TRadioGroup

TRadioGroup Callbacks
=====================

 None.


File: jptui.info,  Node: TRadioGroup Special,  Next: TRadioGroup Notes,  Prev: TRadioGroup Callbacks,  Up: TRadioGroup

TRadioGroup Special
===================

 None.


File: jptui.info,  Node: TRadioGroup Notes,  Next: TScrollBar Description,  Prev: TRadioGroup Special,  Up: TRadioGroup

TRadioGroup Notes
=================

 None.


File: jptui.info,  Node: TScrollBar Description,  Next: TScrollBar Base Classes,  Prev: TRadioGroup Notes,  Up: TScrollBar

TScrollBar Description
======================

 This class provides scrollbars (sometimes known as sliders or proportional
gadgets). You can use them to allow users to select a portion of a larger
area (such as to allow the user to scroll around a large text file when the
window is too small for it), or to allow selection of values (for example,
you could use it as a volume control too, although the TGauge class is
perhaps more suited to that).


File: jptui.info,  Node: TScrollBar Base Classes,  Next: TScrollBar Derived Classes,  Prev: TScrollBar Description,  Up: TScrollBar

TScrollBar Base Classes
=======================

* Menu:

* TObject::


File: jptui.info,  Node: TScrollBar Derived Classes,  Next: TScrollBar Enumerations,  Prev: TScrollBar Base Classes,  Up: TScrollBar

TScrollBar Derived Classes
==========================

 None.


File: jptui.info,  Node: TScrollBar Enumerations,  Next: TScrollBar Data,  Prev: TScrollBar Derived Classes,  Up: TScrollBar

TScrollBar Enumerations
=======================

 None.


File: jptui.info,  Node: TScrollBar Data,  Next: TScrollBar Instanciation,  Prev: TScrollBar Enumerations,  Up: TScrollBar

TScrollBar Data
===============

 None.


File: jptui.info,  Node: TScrollBar Instanciation,  Next: TScrollBar Static Methods,  Prev: TScrollBar Data,  Up: TScrollBar

TScrollBar Instanciation
========================


+ TScrollBar::TScrollBar (
    PObject parent,T
    SbOrientation orientation,
    int rel_x,int rel_y,int length,
    boolean enabled=TRUE)

  Constructs a new scrollbar. 'parent', 'rel_x', 'rel_y', and 'enabled'
  are directly related to the same arguments in the base class's
  constructor method, so their descriptions aren't repeated here
  (*note TObject Instanciation::.).

  The other arguments are detailed below...

  > orientation

    This specifies whether the scrollbar should be vertical or
    horizontal (cf  (*note ScrollBar Definitions::.).

  > length

    This is the length of the scrollbar (ie, the height if you specify a
    vertical scrollbar, or the width if you specify a horizontal one).


File: jptui.info,  Node: TScrollBar Static Methods,  Next: TScrollBar Access Methods,  Prev: TScrollBar Instanciation,  Up: TScrollBar

TScrollBar Static Methods
=========================

 None.


File: jptui.info,  Node: TScrollBar Access Methods,  Next: TScrollBar Callbacks,  Prev: TScrollBar Static Methods,  Up: TScrollBar

TScrollBar Access Methods
=========================


+ void TScrollBar::m_set_value (
    long value)

  Sets the current slider value to 'value' (*note TScrollBar Notes::.).

+ long TScrollBar::m_get_value ()

  Returns the current slider value (*note TScrollBar Notes::.).

+ void TScrollBar::m_set_min_max_values (
    long min_value,
    long max_value)

  Sets the minimum and maximum values (*note TScrollBar Notes::.).

+ long TScrollBar::m_get_min_value ()

  Returns the minimum value (*note TScrollBar Notes::.).

+ long TScrollBar::m_get_max_value ()

  Returns the maximum value (*note TScrollBar Notes::.).

+ void TScrollBar::m_set_little_change (
    long little_change)

  Sets a new little change value (*note TScrollBar Notes::.).

+ void TScrollBar::m_set_big_change (
    long big_change)

  Sets a new big change value (*note TScrollBar Notes::.).


File: jptui.info,  Node: TScrollBar Callbacks,  Next: TScrollBar Special,  Prev: TScrollBar Access Methods,  Up: TScrollBar

TScrollBar Callbacks
====================


+ void TScrollBar::m_set_value_changed_callback (
    void (*value_changed_action)(PObject,char *),
    char *value_changed_argument)

  Sets the function to be called when the scrollbar's value changes to
  'value_changed_action'.  It will be called with a pointer to the
  object concerned as the first argument, and a copy of whatever string
  you specify for 'value_changed_argument' as the second argument.


File: jptui.info,  Node: TScrollBar Special,  Next: TScrollBar Notes,  Prev: TScrollBar Callbacks,  Up: TScrollBar

TScrollBar Special
==================

 None.


File: jptui.info,  Node: TScrollBar Notes,  Next: TSimpleList Description,  Prev: TScrollBar Special,  Up: TScrollBar

TScrollBar Notes
================

 Scrollbars need three values to be specified before they can be displayed...


> min_value

  This is the lowest value that can be represented on the scrollbar.

> max_value

  This is the highest value that can be represented on the scrollbar.

> current_value

  This is what value the scrollbar is currently representing.
  Obviously, this must be somewhere between 'min_value' and 'max_value'.

> little_change

  This is the value added or removed to the slider value when the user
  clicks on one of the arrows of the scrollbar.

> big_change

  This is the value added or removed to the slider value when the user
  clicks in the shaft of the scrollbar.

  As an example, consider if the user was reading a text file 1000 lines
  long, and was currently at line 500.  Then min_value would be 1 (since
  line 1 is the first line), max_value would be 1000 (since the last
  line is 1000), and the current_value would be 500. little_change would
  be 1 and big_change would be the height of a page.


File: jptui.info,  Node: TSimpleList Description,  Next: TSimpleList Base Classes,  Prev: TScrollBar Notes,  Up: TSimpleList

TSimpleList Description
=======================

 The TSimpleList class is used to provide list facilities for other classes,
and should NOT be used directly. It is documented here for completeness only.


File: jptui.info,  Node: TSimpleList Base Classes,  Next: TSimpleList Derived Classes,  Prev: TSimpleList Description,  Up: TSimpleList

TSimpleList Base Classes
========================

* Menu:

* TList::


File: jptui.info,  Node: TSimpleList Derived Classes,  Next: TSimpleList Enumerations,  Prev: TSimpleList Base Classes,  Up: TSimpleList

TSimpleList Derived Classes
===========================

* Menu:

* TListBox::


File: jptui.info,  Node: TSimpleList Enumerations,  Next: TSimpleList Data,  Prev: TSimpleList Derived Classes,  Up: TSimpleList

TSimpleList Enumerations
========================

 None.


File: jptui.info,  Node: TSimpleList Data,  Next: TSimpleList Instanciation,  Prev: TSimpleList Enumerations,  Up: TSimpleList

TSimpleList Data
================

 None.


File: jptui.info,  Node: TSimpleList Instanciation,  Next: TSimpleList Static Methods,  Prev: TSimpleList Data,  Up: TSimpleList

TSimpleList Instanciation
=========================


+ TSimpleList::TSimpleList (
    PObject parent,
    int type,
    int rel_x,int rel_y,
    int width,int height,
    unsigned background,
    char *caption,
    int list_rel_x,int list_rel_y,
    int list_width,int list_height,
    boolean sorted,
    int allowed_item_attribute,
    boolean always_one_item_selected,
    boolean item_hot_key_enabled,
    boolean scrollbar,
    int scrollbar_x,int scrollbar_y,int scrollbar_height,
    boolean enabled)

  Constructs a new TSimpleList object.  Arguments are as follows...

  > parent

    The parent object which the TSimpleList should be attached to.

  > type

    The object type that this list will be used for.

  > rel_x

    The 'x' position of the object, relative to the 'parent'.

  > rel_y

    The 'y' position of the object, relative to the 'parent'.

  > width

    The width of TSimpleList.

  > height

    The height of TSimpleList.

  > background

    The background attributes (*note TWindow::.).

  > caption

    The TSimpleList's caption.

  > list_rel_x

    The 'x' position of the actual list area, relative to the
    TSimpleList's position.

  > list_rel_y

    The 'y' position of the actual list area, relative to the
    TSimpleList's position.

  > list_width

    The 'width' of the actual list area.

  > list_height

    The 'height' of the actual list area.

  > sorted

    Specifies whether the list should be sorted or not.

  > allowed_item_attribute

    Specifies which attributes are allowed for the list's items.

  > always_one_item_selected

    Specifies whether an item has to be selected.

  > item_hot_key_enabled

    Specifies whether items can be selected by their hotkeys.

  > scrollbar

    Specifies whether the TSimpleList should have a scrollbar.

  > scrollbar_x

    Specifies the scrollbar's 'x' position, relative to the
    TSimpleList's position.

  > scrollbar_y

    Specifies the scrollbar's 'y' position, relative to the
    TSimpleList's position.

  > scrollbar_height

    Specifies the scrollbar's 'height'.

  > enabled

    Specifies whether the list should be initially enabled (TRUE) or
    disabled (FALSE).


File: jptui.info,  Node: TSimpleList Static Methods,  Next: TSimpleList Access Methods,  Prev: TSimpleList Instanciation,  Up: TSimpleList

TSimpleList Static Methods
==========================

 None.


File: jptui.info,  Node: TSimpleList Access Methods,  Next: TSimpleList Callbacks,  Prev: TSimpleList Static Methods,  Up: TSimpleList

TSimpleList Access Methods
==========================

 None.


File: jptui.info,  Node: TSimpleList Callbacks,  Next: TSimpleList Special,  Prev: TSimpleList Access Methods,  Up: TSimpleList

TSimpleList Callbacks
=====================

 None.


File: jptui.info,  Node: TSimpleList Special,  Next: TSimpleList Notes,  Prev: TSimpleList Callbacks,  Up: TSimpleList

TSimpleList Special
===================


+ int TSimpleList::m_add_item (
    char* label,
    int attribute=LI_NOATTR)

  Adds the item 'label' to the list, giving it the attributes
  'attribute'.  Returns the item's index, or 0 if the item could not be
  added for some reason.

+ int TSimpleList::m_insert_item (
    int index, char* label, int attribute=LI_NOATTR)

  Adds the item 'label' to the list, at the specified position index,
  giving it the attributes 'attribute'.  Returns the item's index, or 0
  if the item could not be added for some reason.

+ int TSimpleList::m_add_items (
    TListItem items[])

  Adds multiple items to the list at once (*note TList Structures::.).
  Returns the total number of items successfully added.


File: jptui.info,  Node: TSimpleList Notes,  Next: TTab Description,  Prev: TSimpleList Special,  Up: TSimpleList

TSimpleList Notes
=================

 None.


File: jptui.info,  Node: TTab Description,  Next: TTab Base Classes,  Prev: TSimpleList Notes,  Up: TTab

TTab Description
================

 The TTab class is closely related to the TTabGroup class. In fact, they are
useless without each other. Please see the TTabGroup description (*note
TTabGroup Description::.)for more information.


File: jptui.info,  Node: TTab Base Classes,  Next: TTab Derived Classes,  Prev: TTab Description,  Up: TTab

TTab Base Classes
=================

* Menu:

* TGroup::


File: jptui.info,  Node: TTab Derived Classes,  Next: TTab Enumerations,  Prev: TTab Base Classes,  Up: TTab

TTab Derived Classes
====================

 None.


File: jptui.info,  Node: TTab Enumerations,  Next: TTab Data,  Prev: TTab Derived Classes,  Up: TTab

TTab Enumerations
=================

 None.


File: jptui.info,  Node: TTab Data,  Next: TTab Instanciation,  Prev: TTab Enumerations,  Up: TTab

TTab Data
=========

 None.


File: jptui.info,  Node: TTab Instanciation,  Next: TTab Static Methods,  Prev: TTab Data,  Up: TTab

TTab Instanciation
==================


+ TTab::TTab (
    PTabGroup tab_group,
    char *caption)

  Constructs a new TTab object, using the caption 'caption', and
  attaching it to the TTabGroup pointed to by 'tab_group'.


File: jptui.info,  Node: TTab Static Methods,  Next: TTab Access Methods,  Prev: TTab Instanciation,  Up: TTab

TTab Static Methods
===================

 None.


File: jptui.info,  Node: TTab Access Methods,  Next: TTab Callbacks,  Prev: TTab Static Methods,  Up: TTab

TTab Access Methods
===================

 None.


File: jptui.info,  Node: TTab Callbacks,  Next: TTab Special,  Prev: TTab Access Methods,  Up: TTab

TTab Callbacks
==============


+ void TTab::m_set_visible_callback (
    void (*visible_action)(TObject *,char *),
    char *visible_argument)

  Sets 'visible_action' as the function to be invoked when the visible
  TTab changes.  The function will be called with the first argument
  pointing to the object concerned, and the second argument will be a
  copy of whatever string you specify for 'visible_argument'.


File: jptui.info,  Node: TTab Special,  Next: TTab Notes,  Prev: TTab Callbacks,  Up: TTab

TTab Special
============


+ void TTab::m_set_visible ()

  Makes this TTab the visible one in the TTabGroup.


File: jptui.info,  Node: TTab Notes,  Next: TTabGroup Description,  Prev: TTab Special,  Up: TTab

TTab Notes
==========

 None.


File: jptui.info,  Node: TTabGroup Description,  Next: TTabGroup Base Classes,  Prev: TTab Notes,  Up: TTabGroup

TTabGroup Description
=====================

 The TTabGroup class provides the multiple-pages that make applications'
displays so much simpler and less cluttered. To create a TTabGroup, you
simply create it with the constructor method, specifying a few details,
including it's position, and then create the TTabs (the actual pages),
passing the TTabGroup as the first (parent) argument. When you do this, the
TTabGroup is automagically updated with the TTabs -- easy, eh ?


File: jptui.info,  Node: TTabGroup Base Classes,  Next: TTabGroup Derived Classes,  Prev: TTabGroup Description,  Up: TTabGroup

TTabGroup Base Classes
======================

* Menu:

* TGroup::


File: jptui.info,  Node: TTabGroup Derived Classes,  Next: TTabGroup Enumerations,  Prev: TTabGroup Base Classes,  Up: TTabGroup

TTabGroup Derived Classes
=========================

 None.


File: jptui.info,  Node: TTabGroup Enumerations,  Next: TTabGroup Data,  Prev: TTabGroup Derived Classes,  Up: TTabGroup

TTabGroup Enumerations
======================

 None.


File: jptui.info,  Node: TTabGroup Data,  Next: TTabGroup Instanciation,  Prev: TTabGroup Enumerations,  Up: TTabGroup

TTabGroup Data
==============

 None.


File: jptui.info,  Node: TTabGroup Instanciation,  Next: TTabGroup Static Methods,  Prev: TTabGroup Data,  Up: TTabGroup

TTabGroup Instanciation
=======================


+ TTabGroup::TTabGroup (
    PObject parent,
    int rel_x,int rel_y,
    int width,int height,
    unsigned background,
    boolean enabled=TRUE)

  Constructs a new TTabGroup object.  Arguments are as follows...

  > parent

    The parent object that the TTabGroup should be attached to.

  > rel_x

    The 'x' position of the TTabGroup, relative to the parent's 'x'
    position.

  > rel_y

    The 'y' position of the TTabGroup, relative to the parent's 'y'
    position.

  > width

    The width of the TTabGroup.

  > height

    The height of the TTabGroup.

  > background

    The background attributes to use (*note TWindow::.).

  > enabled=TRUE

    Specifies whether the object should be initially enabled or
    disabled.


File: jptui.info,  Node: TTabGroup Static Methods,  Next: TTabGroup Access Methods,  Prev: TTabGroup Instanciation,  Up: TTabGroup

TTabGroup Static Methods
========================

 None.


File: jptui.info,  Node: TTabGroup Access Methods,  Next: TTabGroup Callbacks,  Prev: TTabGroup Static Methods,  Up: TTabGroup

TTabGroup Access Methods
========================

 None.


File: jptui.info,  Node: TTabGroup Callbacks,  Next: TTabGroup Special,  Prev: TTabGroup Access Methods,  Up: TTabGroup

TTabGroup Callbacks
===================

 None.


File: jptui.info,  Node: TTabGroup Special,  Next: TTabGroup Notes,  Prev: TTabGroup Callbacks,  Up: TTabGroup

TTabGroup Special
=================


+ boolean TTabGroup::m_set_focus ()

  cf  (*note TGroup::.).

+ boolean TTabGroup::m_set_focus_to_last_element ()

  cf  (*note TGroup::.).


File: jptui.info,  Node: TTabGroup Notes,  Next: TTextZone Description,  Prev: TTabGroup Special,  Up: TTabGroup

TTabGroup Notes
===============

 None.


File: jptui.info,  Node: TTextZone Description,  Next: TTextZone Base Classes,  Prev: TTabGroup Notes,  Up: TTextZone

TTextZone Description
=====================

 The TTextZone class provides text-editing facilities for JPTUI
applications, all inside a familiar TEditZone (*note TEditZone::.)-style box.


File: jptui.info,  Node: TTextZone Base Classes,  Next: TTextZone Derived Classes,  Prev: TTextZone Description,  Up: TTextZone

TTextZone Base Classes
======================

* Menu:

* TObject::


File: jptui.info,  Node: TTextZone Derived Classes,  Next: TTextZone Enumerations,  Prev: TTextZone Base Classes,  Up: TTextZone

TTextZone Derived Classes
=========================

 None.


File: jptui.info,  Node: TTextZone Enumerations,  Next: TTextZone Data,  Prev: TTextZone Derived Classes,  Up: TTextZone

TTextZone Enumerations
======================

 None.


File: jptui.info,  Node: TTextZone Data,  Next: TTextZone Instanciation,  Prev: TTextZone Enumerations,  Up: TTextZone

TTextZone Data
==============

 None.


File: jptui.info,  Node: TTextZone Instanciation,  Next: TTextZone Static Methods,  Prev: TTextZone Data,  Up: TTextZone

TTextZone Instanciation
=======================


+ TTextZone::TTextZone (
    PObject parent,
    int rel_x,int rel_y,
    int width,int height,
    char *caption,
    int max_text_nb_cols,
    TScrollbarChoice scrollbars=SBC_VERTICAL,
    boolean enabled=TRUE)

  Constructs a new TTextZone object.  Arguments are as follows...

  > parent

    The parent object that the new TTextZone should be attached to.

  > rel_x

    The 'x' position of the TTextZone, relative to the 'x' position of
    the 'parent'.

  > rel_y

    The 'y' position of the TTextZone, relative to the 'y' position of
    the 'parent'.

  > width

    The width of the TTextZone.

  > height

    The height of the TTextZone.

  >  caption

    The caption (label) for the TTextZone.

  > max_text_nb_cols

    The maximum number of columns required.

  > scrollbars

    Specifies which scrollbars the TTextZone has
    (*note ScrollBar Definitions::.).

  > enabled

    Specifies whether the TTextZone should initially be enabled or
    disabled.


File: jptui.info,  Node: TTextZone Static Methods,  Next: TTextZone Access Methods,  Prev: TTextZone Instanciation,  Up: TTextZone

TTextZone Static Methods
========================

 None.


File: jptui.info,  Node: TTextZone Access Methods,  Next: TTextZone Callbacks,  Prev: TTextZone Static Methods,  Up: TTextZone

TTextZone Access Methods
========================


+ void TTextZone::m_set_cursor_at (
    int col, int line,
    boolean make_cursor_visible=TRUE)

  Moves the TTextZone's cursor to line 'line', column 'col'.  If
  'make_cursor_visible' is TRUE, then the visible part of the text will
  be changed so that the cursor is inside the text display area. Note
  that the TTextZone's cursor is separate from all other cursors,
  including the actual hardware cursor, and the EditZone cursors, which
  are also unique.

+ void TTextZone::m_get_cursor_pos (
    int &col,int &line)

  Stores the current cursor position in the memory pointed to by 'col',
  and 'line'.


+ int TTextZone::m_get_nb_lines ()

  Returns the number of lines in the TTextZone.

+ int TTextZone::m_get_nb_cols ()

  Returns the number of columns in the TTextZone.

+ int TTextZone::m_get_text_rel_x()

  Returns the 'x' position of the text area, relative to the 'x'
  position of the TTextZone.

+ int TTextZone::m_get_text_rel_y()

  Returns the 'y' position of the text area, relative to the 'y'
  position of the TTextZone.

+ int TTextZone::m_get_text_width()

  Returns the width of the text area.

+ int TTextZone::m_get_text_height()

  Returns the height of the text area.

+ int TTextZone::m_get_tab_size ()

  Returns the number of spaces the tab character is replaced by.

+ void TTextZone::m_set_tab_size (
    int tab_size)

  Sets the number of spaces the tab character is replaced by to
  'tab_size.'

+ void TTextZone::m_set_first_visible_col (
    int col)

  Scrolls the TTextZone so that 'col' is the first visible column.

+ void TTextZone::m_set_first_visible_line (
    int line)

  Scrolls the TTextZone so that 'line' is the first visible line.

+ int  TTextZone::m_get_first_visible_col()

  Returns the first visible col number of the TTextZone.

+ int  TTextZone::m_get_first_visible_line()

  Returns the first visible line number of the TTextZone.

+ int TTextZone::m_line_length (
    int line_nb)

  Returns the length of line number 'line_nb'.


File: jptui.info,  Node: TTextZone Callbacks,  Next: TTextZone Special,  Prev: TTextZone Access Methods,  Up: TTextZone

TTextZone Callbacks
===================


+ void TTextZone::m_set_nb_lines_changed_callback (
    void (*nb_lines_changed_action)(PObject,char *),
    char *nb_lines_changed_argument)

  Sets the function to invoke when the number of lines changes to
  'nb_lines_changed_action'.  The first argument to the invoked function
  will be the object (ie, the TTextZone) concerned, and the second
  argument will be a copy of whatever string was given for
  'nb_lines_changed_argument'.

+ void TTextZone::m_set_text_changed_callback (
    void (*text_changed_action)(PObject,char *),
    char *text_changed_argument)

  Sets the function to invoke when the text changes to
  'text_changed_action'.  The first argument to the invoked function
  will be the object (ie, the TTextZone) concerned, and the second
  argument will be a copy of whatever string was given for
  'text_changed_argument'.

+ void TTextZone::m_set_cursor_line_changed_callback (
    void (*cursor_line_changed_action)(PObject,char *),
    char *cursol_line_changed_argument)

  Sets the function to invoke when the line of the cursor changes to
  'cursor_line_changed_action'.  The first argument to the invoked
  function will be the object (ie, the TTextZone) concerned, and the
  second argument will be a copy of whatever string was given for
  'cursol_line_changed_argument'.

+ void TTextZone::m_set_cursor_col_changed_callback (
    void (*cursor_col_changed_action)(PObject,char *),
    char *cursol_col_changed_argument)

  Sets the function to invoke when the column of the cursor changes to
  'cursor_col_changed_action'.  The first argument to the invoked
  function will be the object (ie, the TTextZone) concerned, and the
  second argument will be a copy of whatever string was given for
  'cursol_col_changed_argument'.

+ void TTextZone::m_set_cursor_pos_changed_callback (
    void (*cursor_pos_changed_action)(PObject,char *),
    char *cursol_pos_changed_argument)

  Sets the function to invoke when the position (line or column) of
  the cursor changes to 'cursor_col_changed_action'.  The first
  argument to the invoked function will be the object (ie, the
  TTextZone) concerned, and the second argument will be a copy of
  whatever string was given for 'cursol_pos_changed_argument'.

+ void TTextZone::m_set_visible_lines_changed_callback (
    void (*visible_lines_changed_action)(PObject,char *),
    char *visible_lines_changed_argument)

  Sets the function to invoke when the number of lines of the text
  changes to 'visible_lines_changed_action'.  The first argument to the
  invoked function will be the object (ie, the TTextZone) concerned, and
  the second argument will be a copy of whatever string was given for
  'visible_lines_changed_argument'.

+ void TTextZone::m_set_selection_status_changed_callback (
    void (*selection_status_changed_action)(PObject,char *),
    char *selection_status_changed_argument)

  Sets the function to invoke when a part of the text becomes selected
  and where there is no selected part any more to
  'selection_status_changed_action'.  The first argument to the invoked
  function will be the object (ie, the TTextZone) concerned, and the
  second argument will be a copy of whatever string was given for
  'selection_status_changed_argument'.


File: jptui.info,  Node: TTextZone Special,  Next: TTextZone Notes,  Prev: TTextZone Callbacks,  Up: TTextZone

TTextZone Special
=================


+ void TTextZone::m_clear_text ()

  Clears all text in the TTextZone.

+ void TTextZone::m_delete_line (
    int line_nb)

  Deletes line number 'line_nb'.

+ void TTextZone::m_clear_zone (
    int first_col,int first_line,
    int last_col,int last_line)

  Clears an area of text from line first_line, column first_col to line
  'last_line', column 'last_col'.

+ void TTextZone::m_set_line (
    int line_nb,
    char *string)

  Changes the contents of line number 'line_nb' to 'string'.

+ void TTextZone::m_insert_text (
    char* text)

  Inserts the text 'text' (a part of line, several lines...) at the
  current cursor position within the TTextZone. 'text' uses the 'text'
  string format (*note String Datatypes::.).

+ void TTextZone::m_insert_line (
    int line_nb,char *string)

  Creates a new line with the text 'string', and inserts it at line
  number 'line_nb'.

+ char* TTextZone::m_get_zone (
    int first_col,int first_line,
    int last_col,int last_line)

  Copies the text from ('first_line','first_col') to
  ('last_line','last_col') into a specifically-allocated buffer, and
  returns a pointer to it. This buffer uses the 'text' string format
  (*note String Datatypes::.).  It can be used with the 'm_insert_text'
  method. The buffer must be freed with the 'm_free_zone_buffer'
  method.

+ void TTextZone::m_free_zone_buffer ()

  Frees the buffer which is allocated by the 'm_get_zone' method.

+ char* TTextZone::m_get_line (
    int line_nb)

  Copies the line number 'line_nb' into a buffer and returns a pointer
  to the buffer.

+ boolean TTextZone::m_save_text (
   char* file_name)

  Attempts to save all text from the TTextZone to the file name
  'file_name'. Returns a boolean value which indicates success (TRUE),
  or an error (FALSE). If the return code is FALSE (ie, an error), you
  can use the ANSI C error facilities (errnum, etc.) to find out which
  actual error occured.

+ boolean TTextZone::m_load_text (char* file_name)

  Attempts to load all text from the file named 'file_name' into the
  TTextZone. Returns a boolean value which indicates success (TRUE), or
  an error (FALSE). If the return code is FALSE (ie, an error), you can
  use the ANSI C error facilities (errnum, etc.) to find out which
  actual error occured.

+ void TTextZone::m_select_zone (
    int pos1_col,int pos1_line,
    int pos2_col,int pos2_line)

  Selects the area from ('pos1_line','pos1_col') to
  ('pos2_line','pos2_col').


+ void TTextZone::m_unselect_zone ()

  Unselects the previously-selected area.

+ boolean TTextZone::m_zone_selected ()

  Returns a boolean value which indicates whether a zone is currently
  selected.

+ void TTextZone::m_get_selected_zone (
    int &min_col,int &min_line,
    int &max_col,int &max_line)

  Stores the selected area's start and stop positions in the memory
  pointed to by the arguments.  Do NOT call this method unless
  'm_zone_selected' has been used to verify that there is some text
  selected.

+ void TTextZone::m_cut_selection ()

  Cuts the currently selected text into the clipboard
  (*note Application Macros::.).

+ void TTextZone::m_copy_selection ()

  Copies the currently selected text into the clipboard
  (*note Application Macros::.).

+ void TTextZone::m_paste ()

  Pastes the current clipboard contents into the zone
  (*note Application Macros::.).

+ void TTextZone::m_clear_selection ()

  Clears the currently selected text.

+ void TTextZone::m_enable_modification ()

  Enables the modification of the text which is in the textzone.

+ void TTextZone::m_disable_modification ()

  Disables the modification of the text which is in the textzone.


File: jptui.info,  Node: TTextZone Notes,  Next: TWindow Description,  Prev: TTextZone Special,  Up: TTextZone

TTextZone Notes
===============

 None.


File: jptui.info,  Node: TWindow Description,  Next: TWindow Base Classes,  Prev: TTextZone Notes,  Up: TWindow

TWindow Description
===================

 The TWindow class is the most important visual class, providing the basic
display area which all other visible objects are inserted into.


File: jptui.info,  Node: TWindow Base Classes,  Next: TWindow Derived Classes,  Prev: TWindow Description,  Up: TWindow

TWindow Base Classes
====================

* Menu:

* TGroup::


File: jptui.info,  Node: TWindow Derived Classes,  Next: TWindow Enumerations,  Prev: TWindow Base Classes,  Up: TWindow

TWindow Derived Classes
=======================

* Menu:

* THelpWindow::

