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: TWindow Enumerations,  Next: TWindow Data,  Prev: TWindow Derived Classes,  Up: TWindow

TWindow Enumerations
====================

 None.


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

TWindow Data
============

 None.


File: jptui.info,  Node: TWindow Instanciation,  Next: TWindow Static Methods,  Prev: TWindow Data,  Up: TMenu Structures

TWindow Instanciation
=====================


+ TWindow::TWindow (
    word style,
    int x,int y,
    int width,int height,
    char* caption="",
    boolean info_bar=FALSE,
    boolean modal=TRUE,
    boolean movable=TRUE)

  Creates a new TWindow.  Arguments are as follows ...

  > style

    Specifies the style of window to create (*note Window Definitions::.).

  > x

    Specifies the absolute 'x' position of the window.

  > y

    Specifies the absolute 'y' position of the window.

  > width

    Specifies the window's width.

  > height

    Specifies the window's height.

  > caption

    Specifies the window's title.

  > info_bar

    Specifies whether the window should have an info bar, also known as
    a status bar (*note Boolean Definitions::.).

  > modal

    Specifies whether the window should be modal (TRUE), or modeless
    (FALSE) (*note Boolean Definitions::.).

  > movable

    Specifies whether the window can be moved (*note Boolean Definitions::.).


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

TWindow Static Methods
======================

 None.


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

TWindow Access Methods
======================


+ int TWindow::m_get_x ()

  Returns the window's absolute 'x' position.

+ int TWindow::m_get_y ()

  Returns the window's absolute 'y' position.

+ void TWindow::m_set_pos (
    int x, int y)

  Sets the window's position to the absolute coordinates ('x', 'y').

+ void TWindow::m_set_title_attr(
    word attributes)

  Sets the attributes with which the title should be drawn.

+ void TWindow::m_set_default_button (
    PPushButton button)

  Sets the pushbutton that should be selected when the 'default' key
  (Return) is pressed.

+ void TWindow::m_set_cancel_button (
    PPushButton button)

  Sets the pushbutton that should be selected when the 'cancel' key
  (Escape) is pressed.

+ void TWindow::m_set_short_cut_handler (
    PObject handler)

  Sets the object which will receive short cut messages. This object
  will only receive messages with are not already handled by the
  elements of the interface.

+ void TWindow::m_set_info_message (
    char* message)

  Sets the text that will be displayed in the window's info (status)
  bar, if it has one.

+ char * TWindow::m_get_info_message ()

  Returns the text displayed in the window's info (status) bar, if it
  has one.


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

TWindow Callbacks
=================


+ void TWindow::m_set_close_button_pressed_callback (
    void (*close_button_pressed_action)(PObject,char *),
    char *close_button_argument)

  Sets the function to be called when the close button (in the top-left
  corner of the window) is pressed to 'close_button_pressed_action'.
  The function is called with the first object pointing to the window,
  while the second  argument is a copy of the string given for
  'close_button_argument'.


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

TWindow Special
===============


- Misc functions -------------------------------------------------------

+ boolean TWindow::m_set_focus ()

  If a button (*note TPushButton Instanciation::.)PB_DEFAULT (*note PushButton Type Definitions::.) attribute, the focus goes
  to this button. Otherwise, sets the focus to the first element (child
  object) of the window.

*Note TGroup::.

+ boolean TWindow::m_set_focus_to_last_element ()

*Note TGroup::.

+ PObject TWindow::m_get_previous_focused_object ()

  Returns a pointer to whichever object in the window have just lost the
  focus.

+ void TWindow::m_open ()

  Opens the window, making it visible. If the window is already open, it
  is brought to front and becomes active.

+ void TWindow::m_open_as_object_element (
    PObject object)

  Opens the window as a sub-window of another object, so that all events
  which occur in that window are hooked (ie, re-directed) to the parent
  object. This method should only be used by classes derived from
  TObject (*note TObject::.).

+ boolean TWindow::m_activate ()

  Activates the window. Returns a boolean value which indicates success
  or failure.

+ boolean TWindow::m_is_active()

  Returns a boolean value which indicates whether the window is
  currently active.

+ void TWindow::m_close ()

  Closes the window, making it invisible, and redrawing whatever is
  underneath it.


- Text I/O functions ---------------------------------------------------

+ void TWindow::m_gotoxy (
    int x, int y)

  Moves the cursor to the position ('x', 'y'), relative to the window's
  position.

+ word TWindow::m_get_normal_attr (
    unsigned background)
+ word TWindow::m_get_inverse_attr (
    unsigned background)
+ word TWindow::m_get_bright_attr (
    unsigned background)
+ word TWindow::m_get_inactive_attr (
    unsigned background)
+ word TWindow::m_get_inverse_inactive_attr (
    unsigned background)

  These methods return the special code used for their various text
  attributes.  The argument 'background' should be contain the
  background attributes, since the information that you are inquiring
  about may depend on the current background.

+ word TWindow::m_text_attr ()

  Returns the current text attributes.

+ void TWindow::m_set_normal_attr (
    unsigned background)


+ void TWindow::m_set_inverse_attr (
    unsigned background)
+ void TWindow::m_set_bright_attr (
    unsigned background)
+ void TWindow::m_set_inverse_bright_attr (
    unsigned background)
+ void TWindow::m_set_inactive_attr (
    unsigned background)
+ void TWindow::m_set_inverse_inactive_attr (
    unsigned background)

  These functions enable their various text attributes, leaving all
  other attributes unaltered.

+ void TWindow::m_set_clip_window (
    int x,int y, int width,int height)

  Sets a clipping rectangle from ('x','y') to ('width','height')
  relative to the window's coordinates, which all text will be clipped
  to.  Whenever any printed text would go outside this area, it is cut
  short, so that all text outside the clipping rectangle is preserved.

+ void TWindow::m_reset_clip_window ()

  Resets the clipping rectangle so that text can use the entire window
  area.

+ void TWindow::m_cls (
    unsigned background)

  Clears the window to the color and attributes specified by
  'background'.

+ void TWindow::m_putch (
    u_char character)

  Inserts 'character' at the current cursor position within the window.

+ void TWindow::m_putnch (
    int nb_chars, u_char character)

  Puts 'nb_chars' copies of 'character' into the window, as if by
  'for(i=0; i<nb_chars; i++) m_putch(character);'.

+ void TWindow::m_puts (
    char* string)

  Puts text pointed to by 'string' into the window at the current cursor
  position.


+ void TWindow::m_put_caption (
    char* caption,
    boolean show_hot_key,
    int length,
    int position)

  Puts the string 'caption' into the window at the current cursor
  position.  This function uses a special combination of attributes
  which is used for object captions (ie, labels).  'length' specifies
  how long the caption area should be --- the actual caption text will
  be formatted to fill this area, according to the value of 'position'
  (*note Window Definitions::.)). If 'show_hot_key' is TRUE, then the
  hotkey of the caption will be highlighted.

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

+ void TWindow::m_put_text (
    char* text)

  Prints the string 'text' into the window at the current character
  position.

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

+ void TWindow::m_draw_frame (
    int x1,int y1,int x2,int y2,
    unsigned background,
    char *caption,
    boolean enabled)

  Draws a frame from ('x1','y1') to ('x2','y2') into the window.
  Coordinates are relative to the window's position.  Depending on
  whether 'enabled' is TRUE or FALSE, the frame will be drawn in a
  highlighted or normal manner, respectively.  'background' will be used
  for the frame's background attributes, and 'caption' will be displayed
  at the top of the frame, as a title for the contents of the frame.

+ void TWindow::m_display_arrow (
    int arrow_type)

  Draws an arrow of type 'arrow_type' at the current cursor position
  (*note Special Character Definitions::.).


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

TWindow Notes
=============

 TWindows have the following special keys...


+ ALT+F4

  Will press the close button (in the top-left corner of the window).

