@ -379,7 +379,7 @@ Symbols and text can be combined in a label, however the symbol must be at
@@ -379,7 +379,7 @@ Symbols and text can be combined in a label, however the symbol must be at
the beginning and/or at the end of the text. If the text spans multiple lines,
the symbol or symbols will scale up to match the height of all the lines.
\image html symbol-examples.png "Figure 5.5: FLTK symbols and text"
\image html symbol-examples.png "FLTK symbols and text"
\image latex symbol-examples.png "FLTK symbols and text" width=10cm
@ -245,10 +245,9 @@ If these bytes are zero, the "I" byte will be used as an index
@@ -245,10 +245,9 @@ If these bytes are zero, the "I" byte will be used as an index
into the colormap. Colors with both "RGB" set and an "I" >0
are reserved for special use.
Values from 0 to 255, i.e. the "I" index value, represent
colors from the FLTK 1.3.x standard colormap
and are allocated as needed on screens without TrueColor support.
The \b Fl_Color enumeration type defines the
Values from 0 to 255, i.e. the "I" index value, represent colors from the
FLTK standard colormap and are allocated as needed on screens without
TrueColor support. The \b Fl_Color enumeration type defines the
standard colors and color cube for the first 256 colors. All of
these are named with symbols in
\ref enumerations "<FL/Enumerations.H>". Example:
@ -834,8 +833,8 @@ Returns the face and size set by the most recent call to
@@ -834,8 +833,8 @@ Returns the face and size set by the most recent call to
\subsection drawing_character_encoding Character Encoding
FLTK 1.3 expects all text in Unicode UTF-8 encoding. UTF-8 is
ASCII compatible for the first 128 characters. International
FLTK 1.3 and later versions expect all text in Unicode UTF-8 encoding.
UTF-8 is ASCII compatible for the first 128 characters. International
characters are encoded in multibyte sequences.
FLTK expects individual characters, characters that are not part of
@ -143,7 +143,7 @@ Fl_Input widgets, the "replace all" and
@@ -143,7 +143,7 @@ Fl_Input widgets, the "replace all" and
the "replace next " button is a
Fl_Return_Button widget:
\image html editor-replace.png "Figure 7.1: The search and replace dialog"
\image html editor-replace.png "The search and replace dialog"
\image latex editor-replace.png "The search and replace dialog" width=10cm
\code
@ -604,9 +604,9 @@ Congratulations, you've just built your own text editor!
@@ -604,9 +604,9 @@ Congratulations, you've just built your own text editor!
\section editor_final_product The Final Product
The final editor window should look like the image in Figure 7.2.
The final editor window should look like this:
\image html editor.png "Figure 7.2: The completed editor window"
\image html editor.png "The completed editor window"
\image latex editor.png "The completed editor window" width=12cm
\section editor_advanced_features Advanced Features
@ -757,7 +757,7 @@ the display \b should look when running the example programs.
@@ -757,7 +757,7 @@ the display \b should look when running the example programs.
The \c cairo_test demo program shows three shiny buttons drawn with Cairo
in an Fl_Cairo_Window.
\image html cairo_test.png "Figure 22.1: Buttons drawn with Cairo"
\image html cairo_test.png "Buttons drawn with Cairo"
\image latex cairo_test.png "Buttons drawn with Cairo" width=8cm
@ -767,7 +767,7 @@ in an Fl_Cairo_Window.
@@ -767,7 +767,7 @@ in an Fl_Cairo_Window.
The \c icon program lets you set the program icon from an image (here
an Fl_RGB_Image).
\image html icon.png "Figure 22.2: Green icon (Windows 10)"
Normally the FLUID file defines one or more functions or classes which
@ -181,7 +181,7 @@ accomplish seemingly simple tasks with it. This tutorial will
@@ -181,7 +181,7 @@ accomplish seemingly simple tasks with it. This tutorial will
show you how to generate a complete user interface class with
FLUID that is used for the CubeView program provided with FLTK.
\image html cubeview.png "Figure 12.2: CubeView demo"
The window is of class CubeViewUI, and is completely generated by FLUID,
@ -407,7 +407,7 @@ menu item. Name the class "CubeViewUI" and leave the subclass blank.
@@ -407,7 +407,7 @@ menu item. Name the class "CubeViewUI" and leave the subclass blank.
We do not need any inheritance for this window. You should see the
new class declaration in the FLUID browser window.
\image html fluid1.png "Figure 12.3: FLUID file for CubeView"
\image html fluid1.png "FLUID file for CubeView"
\image latex fluid1.png "FLUID file for CubeView" width=10cm
We will talk about the \p show() method that is highlighted
@ -463,7 +463,7 @@ This \p \#include is important, as we have just included
@@ -463,7 +463,7 @@ This \p \#include is important, as we have just included
CubeView as a member of CubeViewUI, so any public CubeView methods are
now available to CubeViewUI.
\image html fluid3-cxx.png "Figure 12.5: CubeView methods"
@ -500,7 +500,7 @@ Make sure the top level CubeViewUI is selected and select
@@ -500,7 +500,7 @@ Make sure the top level CubeViewUI is selected and select
not be adding any widgets to this method FLUID will assign it a return
type of \p void.
\image html fluid4.png "Figure 12.6: CubeView constructor"
Once the new method has been added, highlight its name and select
@ -762,7 +762,7 @@ button the code file will include the header file automatically.
@@ -762,7 +762,7 @@ button the code file will include the header file automatically.
Under the "Internationalization" tab are the \ref fluid_i18n "internationalization"
options, described later in this chapter.
\image html fluid-edit-proj-settings.png "Figure 12.7: FLUID Project Settings Window"
\image html fluid-edit-proj-settings.png "FLUID Project Settings Window"
@ -786,7 +786,7 @@ Tooltips provide descriptions of each option.
@@ -786,7 +786,7 @@ Tooltips provide descriptions of each option.
At the lower-right, "User Settings" causes changes to only affect the current user,
"System Settings" causes changes to be applied to all users on the current machine.
\image html fluid-edit-global-fltk-settings.png "Figure 12.9: FLUID Global Settings Window"
\image html fluid-edit-global-fltk-settings.png "FLUID Global Settings Window"
\image latex fluid-edit-global-fltk-settings.png "FLUID Global Settings Window" width=10cm
\par New/Code/Function
@ -875,7 +875,7 @@ This panel controls the grid that all widgets snap to when you move
@@ -875,7 +875,7 @@ This panel controls the grid that all widgets snap to when you move
and resize them, and for the "snap" which is how far a widget has to be
dragged from its original position to actually change.
\image html fluid-layout-grid-and-size-settings.png "Figure 12.10: FLUID Layout/Grid Settings Window"
\image html fluid-layout-grid-and-size-settings.png "FLUID Layout/Grid Settings Window"
\image html fluid_widget_gui.png "Figure 12.11: The FLUID widget GUI attributes"
\image html fluid_widget_gui.png "The FLUID widget GUI attributes"
\image latex fluid_widget_gui.png "The FLUID widget GUI attributes" width=10cm
\section fluid_widget_attributes GUI Attributes
@ -1049,7 +1049,7 @@ as the class. This can change the icon or window decorations.
@@ -1049,7 +1049,7 @@ as the class. This can change the icon or window decorations.
On most (all?) window managers you will have to close the window
and reopen it to see the effect.
\image html fluid_widget_style.png "Figure 12.12: The FLUID widget Style attributes"
\image html fluid_widget_style.png "The FLUID widget Style attributes"
\image latex fluid_widget_style.png "The FLUID widget Style attributes" width=10cm
@ -1120,7 +1120,7 @@ when they have the focus.
@@ -1120,7 +1120,7 @@ when they have the focus.
Some widgets display text, such as input fields, pull-down
menus, and browsers.
\image html fluid_widget_cxx.png "Figure 12.13: The FLUID widget C++ attributes"
\image html fluid_widget_cxx.png "The FLUID widget C++ attributes"
\image latex fluid_widget_cxx.png "The FLUID widget C++ attributes" width=10cm
\subsection fluid_cpp_attributes C++ Attributes
@ -1499,7 +1499,7 @@ fields will then appear to control the include file and
@@ -1499,7 +1499,7 @@ fields will then appear to control the include file and
function/macro name to use when retrieving the localized label
strings.
\image html fluid-gettext.png "Figure 12.14: Internationalization using GNU gettext"
\image html fluid-gettext.png "Internationalization using GNU gettext"
\image latex fluid-gettext.png "Internationalization using GNU gettext" width=10cm
The \b \#include
@ -1524,7 +1524,7 @@ input fields will then appear to control the include file,
@@ -1524,7 +1524,7 @@ input fields will then appear to control the include file,
catalog file, and set number for retrieving the localized label
strings.
\image html fluid-catgets.png "Figure 12.15: Internationalization using POSIX catgets"
\image html fluid-catgets.png "Internationalization using POSIX catgets"
\image latex fluid-catgets.png "Internationalization using POSIX catgets" width=10cm
@ -120,7 +120,7 @@ be the \p resizable one?
@@ -120,7 +120,7 @@ be the \p resizable one?
Setting the \p resizable to be the icon box won't give us what we want:
\image html resize-example3a.png "Figure 6.3: Resizing dialog example (a)"
\image html resize-example3a.png "Resizing dialog example (a)"
\image latex resize-example3a.png "Resizing dialog example (a)" width=12cm
The message text area would be the logical choice so that the user
@ -128,7 +128,7 @@ can expand the dialog to see if there is more of an explanation below
@@ -128,7 +128,7 @@ can expand the dialog to see if there is more of an explanation below
the short error message. This results in the behaviour shown in the
diagram below.
\image html resize-example3b.png "Figure 6.4: Resizing dialog example (b)"
\image html resize-example3b.png "Resizing dialog example (b)"
\image latex resize-example3b.png "Resizing dialog example (b)" width=12cm
The result is close to what we want, but not quite:
@ -141,7 +141,7 @@ That's ugly. How do we stop that from happening?
@@ -141,7 +141,7 @@ That's ugly. How do we stop that from happening?
Simple: put it in its own group and set the \p resizable to
an invisible box widget, as shown in the diagram below.
\image html resize-example3c.png "Figure 6.5: Resizing dialog example (c)"
\image html resize-example3c.png "Resizing dialog example (c)"
\image latex resize-example3c.png "Resizing dialog example (c)" width=12cm
Now the invisible box, shown as "R", takes all of the
@ -170,7 +170,7 @@ How could you achieve this?
@@ -170,7 +170,7 @@ How could you achieve this?
Setting either of the input fields to be the \p resizable leaves the
other one fixed, as shown below:
\image html resize-example4a.png "Figure 6.6: Resizing input fields example (a)"
\image html resize-example4a.png "Resizing input fields example (a)"
\image latex resize-example4a.png "Resizing input fields example (b)" width=12cm
The answer is to leave the \p resizable of the group set to itself,
@ -179,7 +179,7 @@ equally. Add a button and input field to each subgroup, and set
@@ -179,7 +179,7 @@ equally. Add a button and input field to each subgroup, and set
each subgroup's \p resizable to the input field, as shown below.
Tada!
\image html resize-example4b.png "Figure 6.7: Resizing input fields example (b)"
\image html resize-example4b.png "Resizing input fields example (b)"
\image latex resize-example4b.png "Resizing inut fields example (b)" width=12cm
In FLTK it is possible to solve almost any layout and resizing