Chapter 4. ReqTools Tags

 

  There's no sensation to compare with this.
  Suspended animation, a state of bliss
  Can't keep my mind from the circling sky.
  Tongue-tied and twisted just an earth-bound misfit. I.

 
--Pink Floyd, Learning To Fly 

Here come the Tags

In this section, we'll introduce and discuss all ReqTools tags being part of the tagging system.

Common Tags

These tags are shared between all ReqTools requesters. These are generic tags that you can use to set (for example) requester's title or text or window position.

REQTOOLS_TAG_BUTTONS

This tag is used to pass to define the buttons that the user will be able to press. The value passed to this tag is a string containing all the valid buttons labels.

Each button label is separated from the next one using the "|" (pipe) char.

Cancel button: The last button label is always associated with the Cancel button.

REQTOOLS_TAG_COLOR_RED, REQTOOLS_TAG_COLOR_GREEN, REQTOOLS_TAG_COLOR_BLUE, REQTOOLS_TAG_COLOR_ALPHA

These tags are used to pass the default R,G,B values for the color requester. Valid values range from 0 to 65535 inclusive. This big range for R,G,B and Alpha values has been designed to give you the most accurate setting for the color you want. Anyway, if you are more familiar with the 0 to 255 values, you can wrap your values with these provided macro: RT_SMALL_COL and RT_BIG_COL, which convert small numbers (0-255) to big and vice versa.

REQTOOLS_TAG_CUSTOM_BAG

This tag should be only used by new ReqTools requesters implementators.

REQTOOLS_TAG_DEFAULT_BUTTON

This tag defines the default button of a requester. The tag gets an ordinal value as input that should correspond to the ordinal button.

REQTOOLS_TAG_PARENT_WIN

This tag defines the window that is generating the ReqTools requester. If you provide this value, then the ReqTools requester will appear in the center of the parent window.

Parent Window is a GTK+ window: The parent window passed is actually a GTK+ window

REQTOOLS_TAG_TEXT

This tag defines the text of the ReqTools requester. Text can be spawned on multiple lines using the standard "\n" newline char.

REQTOOLS_TAG_TEXT_ALIGN

This tag defines the alignement. Valid values are:

REQTOOLS_TEXT_ALIGN_LEFT

Align the text on the left

REQTOOLS_TEXT_ALIGN_RIGHT

Align the text on the right

REQTOOLS_TEXT_ALIGN_CENTER

Align the text on the center

REQTOOLS_TEXT_ALIGN_JUSTIFY

Fully align text on both left and right margins

REQTOOLS_TAG_TEXT_BORDER

This tag is used to define if you want or not a border around the text of the requester. Valid values are TRUE or FALSE.

REQTOOLS_TAG_TITLE

This tag is used to define the ReqTools requester winodw title.

REQTOOLS_TAG_WINDOW_WIDTH, REQTOOLS_TAG_WINDOW_HEIGHT

This tag defines the ReqTools requester window width and height. Measures are given in pixels.

Easy Requester Tags

At the moment the Easy Requester does not have any special tag.

Input Requester Tags

REQTOOLS_INPUT_TAG_ENABLE, REQTOOLS_INPUT_TAG_DISABLE

With this tag you can enable or disable the way ReqTools Input will handle keys from the user. Valid modes are:

REQTOOLS_INPUT_MODE_ALPHA

Will accept all alphabetic chars (from a to z) but no numbers or punctiation.

REQTOOLS_INPUT_MODE_NUM

Will accept all numeric chars (from 0 to 9) but no alphabetic chars or punctiation.

REQTOOLS_INPUT_MODE_OTHER

Will accept all chars that are not alphabetic nor numeric.

REQTOOLS_INPUT_MODE_DEFINED

Will accept only chars defined with the tag REQTOOLS_INPUT_VALID_CHARS. See below for more info.

REQTOOLS_INPUT_TAG_DEFAULT_TEXT

This tag sets the default text that will appear in the ReqTools Input.

REQTOOLS_INPUT_TAG_MAX_LENGTH

This tag sets the maximum length of the text input field.

REQTOOLS_INPUT_TAG_MIN, REQTOOLS_INPUT_TAG_MAX

These tags are used to define the minimum and maximum values that an user can insert inside a numeric field.

REQTOOLS_INPUT_TAG_VALID_CHARS

This tag defines the valid chars a user can insert inside a text field. It is very useful to filter the input from a user.

List Requester Tags

REQTOOLS_LIST_TAG_EVENT_CLICK, REQTOOLS_LIST_TAG_EVENT_DCLICK

These tags are used to define function callbacks when the user clicks or double clicks on a list row. Function prototype for the callback is: void function_name ( void * )

REQTOOLS_LIST_TAG_COLUMNS

This tag defines the number of columns that the ReqTools List Requester will have.

REQTOOLS_LIST_TAG_SELECTION_MODE

This tag defines the way selection will work inside the ReqTools List Requester. Valid values are:

REQTOOLS_LIST_SELECTION_SINGLE

Equals to GTK_SELECTION_SINGLE

REQTOOLS_LIST_SELECTION_BROWSE

Equals to GTK_SELECTION_BROWSE

REQTOOLS_LIST_SELECTION_MULTIPLE

Equals to GTK_SELECTION_MULTIPLE

REQTOOLS_LIST_SELECTION_EXTENDED

Equals to GTK_SELECTION_EXTENDED

REQTOOLS_LIST_TAG_SHOW_FORE_COLOR

If the value passed to this tag is TRUE, then the fore color used to display entries on the list will be the one defined by reqtools_list_set_color(), and not the default one.

REQTOOLS_LIST_TAG_SHOW_BACK_COLOR

If the value passed to this tag is TRUE, then the background color used to display entries on the list will be the one defined by reqtools_list_set_color(), and not the default one.

File Requester Tags

REQTOOLS_FILE_TAG_FILE_NAME

This tag defines the starting file name for the ReqTools File Requester.

REQTOOLS_FILE_TAG_PATH

This tag defines the starting path for the ReqTools File Requester.

REQTOOLS_FILE_TAG_SHOW_COLORS

If this tag is set to TRUE, then files and directories will be shown using different colors similar to those used in the original Amiga ReqTools library.

Color Requester Tags

At the moment the Color Requester does not have any special tag.