From d240b98ff6187831aba7309cca012cef410b4b29 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 25 Jul 2002 12:46:12 +0000 Subject: Add missing color function documentation. Fix Fl_Tabs document WRT coloring of the tabs and pane. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2549 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/Fl_Tabs.html | 118 ++++++++++++++++++++++++++----------------- documentation/functions.html | 108 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 179 insertions(+), 47 deletions(-) (limited to 'documentation') diff --git a/documentation/Fl_Tabs.html b/documentation/Fl_Tabs.html index 4e1cfde4f..d9c8dabb6 100644 --- a/documentation/Fl_Tabs.html +++ b/documentation/Fl_Tabs.html @@ -1,64 +1,88 @@ - + + + +

class Fl_Tabs

+
+

Class Hierarchy

- +

Include Files

- +

Description

- The Fl_Tabs widget is the "file card tabs" interface that -allows you to put lots and lots of buttons and switches in a panel, as -popularized by many toolkits. + +

The Fl_Tabs widget is the "file card tabs" +interface that allows you to put lots and lots of buttons and +switches in a panel, as popularized by many toolkits. +

Fl_Tabs widget.

-

Clicking the tab makes a child visible() (by calling -show() on it) and all other children are invisible (by calling -hide() on them). Usually the children are -Fl_Group widgets containing several widgets -themselves.

-

Each child makes a card, and it's label() is printed on the -card tab (including the label font and style). The color of that child -is used to color the card as well. Currently this only draws nicely if -you set box() to the -default FL_THIN_UP_BOX or to FL_FLAT_BOX, which gets -rid of the edges drawn on the sides and bottom.

+ +

Clicking the tab makes a child visible() by calling +show() on it, and all other children are made invisible +by calling hide() on them. Usually the children are Fl_Group widgets +containing several widgets themselves. + +

Each child makes a card, and it's label() is printed +on the card tab, including the label font and style. The +selection color of that child is used to color the tab, while +the color of the child determines the background color of the +pane. +

The size of the tabs is controlled by the bounding box of the -children (there should be some space between the children and the edge -of the Fl_Tabs), and the tabs may be placed "inverted" on the -bottom, this is determined by which gap is larger. It is easiest to -lay this out in fluid, using the fluid browser to select each child -group and resize them until the tabs look the way you want them to.

+children (there should be some space between the children and +the edge of the Fl_Tabs), and the tabs may be placed +"inverted" on the bottom, this is determined by which +gap is larger. It is easiest to lay this out in fluid, using the +fluid browser to select each child group and resize them until +the tabs look the way you want them to. +

Methods

+ -

Fl_Tabs::Fl_Tabs(int x, int y, int w, int h, + +

Fl_Tabs::Fl_Tabs(int x, int y, int w, int h, const char *label = 0)

- Creates a new Fl_Tabs widget using the given position, size, + +

Creates a new Fl_Tabs widget using the given position, size, and label string. The default boxtype is FL_THIN_UP_BOX. -

Use add(Fl_Widget *) - to add each child (which is probably itself a Fl_Group). The -children should be sized to stay away from the top or bottom edge of -the Fl_Tabs, which is where the tabs are drawn.

-

virtual Fl_Tabs::~Fl_Tabs()

- The destructor also deletes all the children. This allows a -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_Tabs and all of it's children can be automatic (local) -variables, but you must declare the Fl_Tabsfirst, so -that it is destroyed last. -

Fl_Widget* Fl_Tabs::value() const -
int Fl_Tabs::value(Fl_Widget*)

- Gets or sets the currently visible widget/tab. + +

Use add(Fl_Widget +*) to add each child, which are usually +Fl_Group widgets. The children should be sized to stay +away from the top or bottom edge of the Fl_Tabs widget, +which is where the tabs will be drawn. + +

virtual Fl_Tabs::~Fl_Tabs()

+ +

The destructor also deletes all the children. This +allows a 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_Tabs and all of it's children +can be automatic (local) variables, but you must declare the +Fl_Tabs widget first so that it is destroyed +last. + +

Fl_Widget* Fl_Tabs::value() const +
int Fl_Tabs::value(Fl_Widget*)

+ +

Gets or sets the currently visible widget/tab. + + + diff --git a/documentation/functions.html b/documentation/functions.html index d38f2615f..cdd3f7666 100644 --- a/documentation/functions.html +++ b/documentation/functions.html @@ -13,10 +13,13 @@ A.

  • fl_alert
  • fl_ask
  • +
  • fl_average_color
  • fl_beep
  • fl_choice
  • fl_color_chooser
  • fl_color_cube
  • +
  • fl_contrast
  • +
  • fl_darker
  • fl_dir_chooser
  • fl_file_chooser
  • fl_file_chooser_callback
  • @@ -31,6 +34,7 @@ A.
  • fl_filename_setext
  • fl_gray_ramp
  • fl_input
  • +
  • fl_lighter
  • fl_message
  • fl_message_font
  • fl_message_icon
  • @@ -67,8 +71,12 @@ A.
  • Drawing Functions @@ -148,6 +156,37 @@ a shortcut for No.

    The fl_ask window. + +

    fl_average_color

    + +
    + +

    Include Files

    + + + +

    Prototype

    + + + +

    Description

    + +

    Returns the weighted average color between the two colors. +The red, green, and blue values are averaged using the following +formula: + +

    + +

    Thus, a weight value of 1.0 will return the +first color, while a value of 0.0 will return the second color. + +

    fl_beep

    @@ -303,6 +342,53 @@ fl_color_cube(R * (FL_NUM_RED - 1) / 255, + +

    fl_contrast

    + +
    + +

    Include Files

    + + + +

    Prototype

    + + + +

    Description

    + +

    Returns the foreground color if it contrasts sufficiently +with the background color. Otherwise, returns +FL_WHITE or FL_BLACK depending on +which color provides the best contrast. + + + +

    fl_darker

    + +
    + +

    Include Files

    + + + +

    Prototype

    + + + +

    Description

    + +

    Returns a darker version of the specified color. + +

    fl_dir_chooser

    @@ -806,6 +892,28 @@ label are after the default value.

    The fl_input window. + +

    fl_lighter

    + +
    + +

    Include Files

    + + + +

    Prototype

    + + + +

    Description

    + +

    Returns a lighter version of the specified color. + +

    fl_message

    -- cgit v1.2.3