From 59c96f54635aed579fcb40a1980ff3694af46bd8 Mon Sep 17 00:00:00 2001 From: Bill Spitzak Date: Wed, 27 Jan 1999 08:45:11 +0000 Subject: Fixes to documentation. Restored the lines drawn around symbols, it uses fl_color_average to pick a dark line color that is still deactivatable. Requested by CE. git-svn-id: file:///fltk/svn/fltk/trunk@249 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/Fl_Button.html | 4 +-- documentation/Fl_Choice.html | 4 +-- documentation/Fl_End.html | 7 +++-- documentation/Fl_Gl_Window.html | 20 +------------ documentation/Fl_Group.html | 58 ++++++++++++++++++++--------------- documentation/Fl_Menu_Bar.html | 6 ++-- documentation/Fl_Menu_Button.html | 6 ++-- documentation/Fl_Menu_Item.html | 21 ++++++------- documentation/Fl_Tile.html | 7 +++-- documentation/Fl_Valuator.html | 6 ++-- documentation/Fl_Widget.html | 29 ++++++++++++------ documentation/Fl_Window.html | 20 ++++++++----- documentation/common.html | 2 +- documentation/enumerations.html | 63 +++++++++++++++++++++++++++++---------- documentation/functions.html | 57 +++++++++++++++++++---------------- documentation/widgets.html | 2 +- 16 files changed, 180 insertions(+), 132 deletions(-) (limited to 'documentation') diff --git a/documentation/Fl_Button.html b/documentation/Fl_Button.html index f0bb3fd67..3c713852d 100644 --- a/documentation/Fl_Button.html +++ b/documentation/Fl_Button.html @@ -26,7 +26,7 @@ control exactly when and how by changing the values for type()

Buttons can also generate callbacks in response to FL_SHORTCUT events. The button can either have an explicit shortcut() value or a letter shortcut can be indicated in -the label() with an ''character before it. For the label +the label() with an '&' character before it. For the label shortcut it does not matter if Alt is held down, but if you have an input field in the same window, the user will have to hold down the Alt key so that the input field does not eat the event first as an @@ -86,7 +86,7 @@ group (calling value(1) or set() does not do this).
void Fl_Button::shortcut(ulong key) The first form returns the current shortcut key for the button.

The second form sets the shortcut key to key. Setting this -overrides the use of ''in the label(). The value is a bitwise +overrides the use of '&' in the label(). The value is a bitwise OR of a key and a set of shift flags, for example FL_ALT | 'a' , FL_ALT | (FL_F + 10), or just 'a'. A value of 0 disables the shortcut.

diff --git a/documentation/Fl_Choice.html b/documentation/Fl_Choice.html index e6f52706a..c13d95ddb 100644 --- a/documentation/Fl_Choice.html +++ b/documentation/Fl_Choice.html @@ -33,10 +33,10 @@ to that item and then the callback is done.

first two buttons to increment/decrement the choice is not implemented. This could be added with a subclass, however.

The menu will also pop up in response to shortcuts indicated by -putting a ''character in the label(). See +putting a '&' character in the label(). See Fl_Button for a description of this.

Typing the shortcut() of any of the items will do exactly -the same as when you pick the item with the mouse. The ''character in +the same as when you pick the item with the mouse. The '&' character in item names are only looked at when the menu is popped up, however.

Methods

Description

- This is a dummy class that allows you to end a group in a constructor -list of a class: +This is a dummy class that allows you to end a Fl_Group in a constructor list of a +class:

Description

- The Fl_Menu_Item structure defines a single menu item that is -used by the Fl_Menu_ class. This structure is defined in -<FL/Fl_Menu_Item.H> + +The Fl_Menu_Item structure defines a single menu item that +is used by the Fl_Menu_ class. This +structure is defined in <FL/Fl_Menu_Item.H> +
     struct Fl_Menu_Item {
    @@ -134,9 +134,10 @@ releases of FLTK. 


    void Fl_Menu_Item::label(const char*)
    void Fl_Menu_Item::label(Fl_Labeltype, const char*) This is the title of the item. A NULL here indicates the end -of the menu (or of a submenu). A ''in the item will print an +of the menu (or of a submenu). A '&' in the item will print an underscore under the next letter, and if the menu is popped up that -letter will be a "shortcut" to pick that item. To get a real ''put two +letter will be a "shortcut" to pick that item. To get a +real '&' put two in a row.

    Fl_Labeltype Fl_Menu_Item::labeltype() const @@ -208,8 +209,8 @@ setting).

    int Fl_Menu_Item::submenu() const

    Returns true if either FL_SUBMENU or FL_SUBMENU_POINTER is on in the flags. FL_SUBMENU indicates an embedded submenu -that goes from the next item through the next one with a NULL -label(). FL_SUBMENU_POINTER indicates that user_data() +that goes from the next item through the next one with a NULL +label(). FL_SUBMENU_POINTER indicates that user_data() is a pointer to another menu array.

    int Fl_Menu_Item::checkbox() const

    Returns true if a checkbox will be drawn next to this item. This is diff --git a/documentation/Fl_Tile.html b/documentation/Fl_Tile.html index fb837d70b..e906105a0 100644 --- a/documentation/Fl_Tile.html +++ b/documentation/Fl_Tile.html @@ -21,7 +21,7 @@

    Description

    The Fl_Tile class lets you resize the children by dragging the border between them: -

    +

    Fl_Tile allows objects to be resized to zero dimensions. To prevent this you can use the resizable() to limit where corners can be dragged to.

    @@ -30,7 +30,8 @@ initially have non-zero sizes so the Fl_Tile can figure out their layout. If desired, call position() after creating the children but before displaying the window to set the borders where you want.

    -

    The "borders" are part of the children, an Fl_Tiledoes not +

    The "borders" are part of the children, an + Fl_Tile does not draw any graphics of it's own. In the above example all the final children have FL_DOWN_BOX types, and the "ridges" you see are two adjacent FL_DOWN_BOX's drawn next to each other.

    @@ -50,7 +51,7 @@ and label string. The default boxtype is FL_NO_BOX. whole tree to be deleted at once, without having to keep a pointer to all the children in the user code. A kludge has been done so the Fl_Tile and all of it's children can be automatic (local) -variables, but you must declare the Fl_Tilefirst, so +variables, but you must declare the Fl_Tile first, so that it is destroyed last.

    void Fl_Tile::position(from_x, from_y, to_x, to_y)

    diff --git a/documentation/Fl_Valuator.html b/documentation/Fl_Valuator.html index b192d8f62..ccc6a2867 100644 --- a/documentation/Fl_Valuator.html +++ b/documentation/Fl_Valuator.html @@ -24,9 +24,9 @@ and provides a consistent interface to set the value, range, and step, and insures that callbacks are done the same for every object.

    There are probably more of these classes in fltk than any others:

    -

    +

    In the above diagram each box surrounds an actual subclass. These -are further differentiated by setting the +are further differentiated by setting the type() of the widget to the symbolic value labeling the widget. The ones labelled "0" are the default versions with a type(0). For consistency the symbol FL_VERTICAL is @@ -130,7 +130,7 @@ set to zero it uses fabs(maximum() - minimum()) / 100. by value(x) and just before doing a callback (the callback can turn it back on if desired).

    void Fl_Widget::set_changed()

    -

    Sets the changed() flag.

    +Sets the changed() flag.

    void Fl_Widget::clear_changed()

    Clears the changed() flag. diff --git a/documentation/Fl_Widget.html b/documentation/Fl_Widget.html index 63c534fe6..a64f46677 100644 --- a/documentation/Fl_Widget.html +++ b/documentation/Fl_Widget.html @@ -39,14 +39,13 @@ to call redraw() after these.

  • activate
  • active
  • active_r
  • -
  • activevisible
  • align
  • argument
  • box
  • +
  • callback
@@ -78,10 +78,11 @@ to call redraw() after these.

  • show
  • size
  • take_focus
  • -
  • type
  • +
  • takesevents
  • If this function is not called, FLTK tries to figure out the range from the setting of resizeable() @@ -250,7 +252,9 @@ non-alphanumeric character and capitalizing the first character, and the second one if the first is 'x'. Thus "foo" turns into "foo, Foo", and "xprog.1" turns into "xprog, XProg". This only works if called before calling show(). -

    This method has no effect under Microsoft Windows.

    +

    Under Microsoft Windows this string is used as the name of the +WNDCLASS structure, though it is not clear if this can have any +visible effect.

    void Fl_Window::make_current()

    make_current() sets things up so that the drawing functions in <FL/fl_draw.H> will go into this diff --git a/documentation/common.html b/documentation/common.html index ae42af388..b98ec9c75 100644 --- a/documentation/common.html +++ b/documentation/common.html @@ -62,7 +62,7 @@ input->value("Now is the time for all good men...");

    The string is copied to the widget's own storage when you set the -value() of the widget. +value() of the widget.

    Valuators

    Unlike text widgets, valuators keep track of numbers instead of strings. FLTK provides the following valuators: diff --git a/documentation/enumerations.html b/documentation/enumerations.html index 2bb19ce69..be8d012c7 100644 --- a/documentation/enumerations.html +++ b/documentation/enumerations.html @@ -2,6 +2,8 @@

    C - FLTK Enumerations

    This appendix lists the enumerations provided in the <FL/Enumerations.H> header file, organized by section. +Constants whose value is zero are marked with "(0)", this is often +useful to know when programming.

    Version Numbers

    The FLTK version number is stored in a number of compile-time constants: @@ -16,7 +18,8 @@ the major and minor release numbers, currently 1.0. Events are identified by an Fl_Event enumeration value. The following events are currently defined:
      -
    • FL_NO_EVENT - No event occurred.
    • +
    • FL_NO_EVENT - No event (or an event fltk does not +understand) occurred (0).
    • FL_PUSH - A mouse button was pushed.
    • FL_RELEASE - A mouse button was released.
    • FL_ENTER - The mouse pointer entered a widget.
    • @@ -42,7 +45,7 @@ following events are currently defined:

      Callback "When" Conditions

      The following constants determine when a callback is performed:
        -
      • FL_WHEN_NEVER - Never call the callback.
      • +
      • FL_WHEN_NEVER - Never call the callback (0).
      • FL_WHEN_CHANGED - Do the callback only when the widget value changes.
      • FL_WHEN_NOT_CHANGED - Do the callback whenever the user @@ -116,18 +119,29 @@ FL_KEYBOARD and FL_SHORTCUT events: Fl_Widget::align() to control the positioning of the label:
          -
        • FL_ALIGN_CENTER - The label is centered.
        • +
        • FL_ALIGN_CENTER - The label is centered (0).
        • FL_ALIGN_TOP - The label is top-aligned.
        • FL_ALIGN_BOTTOM - The label is bottom-aligned.
        • FL_ALIGN_LEFT - The label is left-aligned.
        • FL_ALIGN_RIGHT - The label is right-aligned.
        • -
        • FL_ALIGN_INSIDE - The label is put inside the widget.
        • FL_ALIGN_CLIP - The label is clipped to the widget.
        • FL_ALIGN_WRAP - The label text is wrapped as needed.
        • +
        • FL_ALIGN_TOP_LEFT
        • +
        • FL_ALIGN_TOP_RIGHT
        • +
        • FL_ALIGN_BOTTOM_LEFT
        • +
        • FL_ALIGN_BOTTOM_RIGHT
        • +
        • FL_ALIGN_LEFT_TOP
        • +
        • FL_ALIGN_RIGHT_TOP
        • +
        • FL_ALIGN_LEFT_BOTTOM
        • +
        • FL_ALIGN_RIGHT_BOTTOM
        • +
        • FL_ALIGN_INSIDE - 'or' this with other values to put +label inside the widget.
        • +

        Fonts

        The following constants define the standard FLTK fonts: -
      • FL_HELVETICA - Helvetica (or Arial) normal.
      • +
          +
        • FL_HELVETICA - Helvetica (or Arial) normal (0).
        • FL_HELVETICA_BOLD - Helvetica (or Arial) bold.
        • FL_HELVETICA_ITALIC - Helvetica (or Arial) oblique.
        • FL_HELVETICA_BOLD_ITALIC - Helvetica (or Arial) @@ -144,32 +158,49 @@ bold-oblique.
        • FL_SCREEN - Default monospaced screen font.
        • FL_SCREEN_BOLD - Default monospaced bold screen font.
        • FL_ZAPF_DINGBATS - Zapf-dingbats font. +
        +

        Colors

        The following color constants can be used to access the colors in the FLTK standard color palette:
          -
        • FL_BLACK
        • +
        • FL_BLACK - the default label color (0)
        • FL_RED
        • FL_GREEN
        • FL_YELLOW
        • FL_BLUE
        • FL_MAGENTA
        • FL_CYAN
        • -
        • FL_WHITE
        • -
        • FL_GRAY0
        • -
        • FL_DARK3
        • -
        • FL_DARK2
        • -
        • FL_DARK1
        • -
        • FL_GRAY
        • -
        • FL_LIGHT1
        • -
        • FL_LIGHT2
        • -
        • FL_LIGHT3
        • +
        • FL_WHITE - the default background for text
        • +
        • FL_SELECTION_COLOR - change to dark blue for Windows style
        • +
        • FL_GRAY - the default color.
        + +In addition there are two inline functions to allow you to select +grays or colors from the FLTK colormap: + +

        Fl_Color fl_gray_ramp(int i) +
        Returs a gray color. Returns black for zero, returns white for +FL_NUM_GRAY (which is 24) minus 1. To get the closest to an +8-bit gray value 'I' use +fl_gray_ramp(I*FL_NUM_GRAY/256) + +

        Fl_Color fl_color_cube(int r, int g, int b) +
        Returns a color out of the color cube. + +r must be in the range 0 to FL_NUM_RED (5) minus 1. +g must be in the range 0 to FL_NUM_GREEN (8) minus 1. +b must be in the range 0 to FL_NUM_BLUE (5) minus 1. + +To get the closest color to a 8-bit set of R,G,B values use +fl_color_cube(R*FL_NUM_RED/256, G*FL_NUM_GREEN/256, +B*FL_NUM_BLUE/256); +

        Cursors

        The following constants define the mouse cursors that are available in FLTK:
          -
        • FL_CURSOR_DEFAULT - the default cursor, usually an arrow
        • +
        • FL_CURSOR_DEFAULT - the default cursor, usually an arrow (0)
        • FL_CURSOR_ARROW - an arrow pointer
        • FL_CURSOR_CROSS - crosshair
        • FL_CURSOR_WAIT - watch or hourglass
        • diff --git a/documentation/functions.html b/documentation/functions.html index 96ddc536b..d8943d3b7 100644 --- a/documentation/functions.html +++ b/documentation/functions.html @@ -38,25 +38,27 @@ the user types ESC or clicks outside the window. waits for the user to hit the button. The message will wrap to fit the window, or may be many lines by putting \n characters into it. The enter key is a shortcut for the OK button. -

          +

          void fl_alert(const char *, ...)

          Same as fl_message() except for the "!" symbol. -

          +

          int fl_ask(const char *, ...)

          Displays a printf-style message in a pop-up box with an "Yes" and "No" button and waits for the user to hit a button. The return value is 1 if the user hits Yes, 0 if they pick No. The enter key is a shortcut for Yes and ESC is a shortcut for No. -

          +

          int fl_choice(const char *q, const char *b0, const char *b1, const char *b2, ...)

          - Shows the message with three buttons below it marked with the strings -b0, b1, and b2. Returns 0, 1, or 2 depending on -which button is hit. ESC is a shortcut for button 0 and the enter key -is a shortcut for button 1. Notice the "misordered" position of the -buttons. You can hide buttons by passing NULL as their -labels. -

          + + Shows the message with three buttons below it marked with the strings + b0, b1, and b2. Returns 0, 1, or 2 +depending on which button is hit. ESC is a shortcut for button 0 and +the enter key is a shortcut for button 1. Notice the buttons are +positioned "backwards" You can hide buttons by passing +NULL as their labels. + +

          const char *fl_input(const char *label, const char *deflt = 0, ...)

          Pops up a window displaying a string, lets the user edit it, and @@ -64,12 +66,12 @@ return the new value. The cancel button returns NULL. The returned pointer is only valid until the next time fl_input() is called. Due to back-compatability, the arguments to any printf commands in the label are after the default value. -

          +

          const char *fl_password(const char *label, const char *deflt = 0, ...)

          Same as fl_input() except an Fl_Secret_Input field is used. -

          +

          void fl_message_font(Fl_Font fontid, uchar size)

          Change the font and font size used for the messages in all the popups. @@ -269,7 +271,9 @@ index of each word. The callback should return zero if the switch is unrecognized, and not change i. It should return non-zero if the switch is recognized, and add at least 1 to i (it can add more to consume words after the switch). This function is called -before any other tests, so you can override any FLTK switch.

          +before any other tests, so you can override any FLTK +switch (this is why fltk can use very short switches instead of +the long ones all other toolkits force you to use).

          On return i is set to the index of the first non-switch. This is either: