|
|
@ -47,7 +47,7 @@ the <tt>.h</tt> file or they can |
|
|
|
\p \#include |
|
|
|
\p \#include |
|
|
|
the <tt>.cxx</tt> file so it still appears to be a single source file. |
|
|
|
the <tt>.cxx</tt> file so it still appears to be a single source file. |
|
|
|
|
|
|
|
|
|
|
|
\image html fluid-org.png "Figure 12.1: FLUID organization" |
|
|
|
\image html fluid-org.png "FLUID organization" |
|
|
|
\image latex fluid-org.png "FLUID organization" width=12cm |
|
|
|
\image latex fluid-org.png "FLUID organization" width=12cm |
|
|
|
|
|
|
|
|
|
|
|
Normally the FLUID file defines one or more functions or classes which |
|
|
|
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 |
|
|
|
show you how to generate a complete user interface class with |
|
|
|
show you how to generate a complete user interface class with |
|
|
|
FLUID that is used for the CubeView program provided with FLTK. |
|
|
|
FLUID that is used for the CubeView program provided with FLTK. |
|
|
|
|
|
|
|
|
|
|
|
\image html cubeview.png "Figure 12.2: CubeView demo" |
|
|
|
\image html cubeview.png "CubeView demo" |
|
|
|
\image latex cubeview.png "CubeView demo" width=10cm |
|
|
|
\image latex cubeview.png "CubeView demo" width=10cm |
|
|
|
|
|
|
|
|
|
|
|
The window is of class CubeViewUI, and is completely generated by FLUID, |
|
|
|
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. |
|
|
|
We do not need any inheritance for this window. You should see the |
|
|
|
We do not need any inheritance for this window. You should see the |
|
|
|
new class declaration in the FLUID browser window. |
|
|
|
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 |
|
|
|
\image latex fluid1.png "FLUID file for CubeView" width=10cm |
|
|
|
|
|
|
|
|
|
|
|
\par Adding the Class Constructor |
|
|
|
\par Adding the Class Constructor |
|
|
@ -435,7 +435,7 @@ CubeViewUI. |
|
|
|
|
|
|
|
|
|
|
|
When you are finished you should have something like this: |
|
|
|
When you are finished you should have something like this: |
|
|
|
|
|
|
|
|
|
|
|
\image html fluid2.png "Figure 12.4: FLUID window containing CubeView demo" |
|
|
|
\image html fluid2.png "FLUID window containing CubeView demo" |
|
|
|
\image latex fluid2.png "FLUID window containing CubeView demo" width=10cm |
|
|
|
\image latex fluid2.png "FLUID window containing CubeView demo" width=10cm |
|
|
|
|
|
|
|
|
|
|
|
We will talk about the \p show() method that is highlighted |
|
|
|
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 |
|
|
|
CubeView as a member of CubeViewUI, so any public CubeView methods are |
|
|
|
CubeView as a member of CubeViewUI, so any public CubeView methods are |
|
|
|
now available to CubeViewUI. |
|
|
|
now available to CubeViewUI. |
|
|
|
|
|
|
|
|
|
|
|
\image html fluid3-cxx.png "Figure 12.5: CubeView methods" |
|
|
|
\image html fluid3-cxx.png "CubeView methods" |
|
|
|
\image latex fluid3-cxx.png "CubeView methods" width=10cm |
|
|
|
\image latex fluid3-cxx.png "CubeView methods" width=10cm |
|
|
|
|
|
|
|
|
|
|
|
\par Defining the Callbacks |
|
|
|
\par Defining the Callbacks |
|
|
@ -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 |
|
|
|
not be adding any widgets to this method FLUID will assign it a return |
|
|
|
type of \p void. |
|
|
|
type of \p void. |
|
|
|
|
|
|
|
|
|
|
|
\image html fluid4.png "Figure 12.6: CubeView constructor" |
|
|
|
\image html fluid4.png "CubeView constructor" |
|
|
|
\image latex fluid4.png "CubeView constructor" width=10cm |
|
|
|
\image latex fluid4.png "CubeView constructor" width=10cm |
|
|
|
|
|
|
|
|
|
|
|
Once the new method has been added, highlight its name and select |
|
|
|
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. |
|
|
|
Under the "Internationalization" tab are the \ref fluid_i18n "internationalization" |
|
|
|
Under the "Internationalization" tab are the \ref fluid_i18n "internationalization" |
|
|
|
options, described later in this chapter. |
|
|
|
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" |
|
|
|
\image latex fluid-edit-proj-settings.png "FLUID Project Settings Window" width=10cm |
|
|
|
\image latex fluid-edit-proj-settings.png "FLUID Project Settings Window" width=10cm |
|
|
|
|
|
|
|
|
|
|
|
\par Edit/GUI Settings... (Shift+Alt+p) |
|
|
|
\par Edit/GUI Settings... (Shift+Alt+p) |
|
|
@ -770,7 +770,7 @@ options, described later in this chapter. |
|
|
|
\par |
|
|
|
\par |
|
|
|
Displays the GUI Settings panel, used to control the user interface settings. |
|
|
|
Displays the GUI Settings panel, used to control the user interface settings. |
|
|
|
|
|
|
|
|
|
|
|
\image html fluid-edit-gui-settings.png "Figure 12.8: FLUID GUI Settings Window" |
|
|
|
\image html fluid-edit-gui-settings.png "FLUID GUI Settings Window" |
|
|
|
\image latex fluid-edit-gui-settings.png "FLUID GUI Settings Window" width=10cm |
|
|
|
\image latex fluid-edit-gui-settings.png "FLUID GUI Settings Window" width=10cm |
|
|
|
|
|
|
|
|
|
|
|
\par Edit/Global FLTK Settings... (Shift+Alt+g) |
|
|
|
\par Edit/Global FLTK Settings... (Shift+Alt+g) |
|
|
@ -786,7 +786,7 @@ Tooltips provide descriptions of each option. |
|
|
|
At the lower-right, "User Settings" causes changes to only affect the current user, |
|
|
|
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. |
|
|
|
"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 |
|
|
|
\image latex fluid-edit-global-fltk-settings.png "FLUID Global Settings Window" width=10cm |
|
|
|
|
|
|
|
|
|
|
|
\par New/Code/Function |
|
|
|
\par New/Code/Function |
|
|
@ -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 |
|
|
|
and resize them, and for the "snap" which is how far a widget has to be |
|
|
|
dragged from its original position to actually change. |
|
|
|
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 latex fluid-layout-grid-and-size-settings.png "FLUID Layout/Grid Settings Window" width=10cm |
|
|
|
\image latex fluid-layout-grid-and-size-settings.png "FLUID Layout/Grid Settings Window" width=10cm |
|
|
|
|
|
|
|
|
|
|
|
\par Shell/Execute Command... (Alt+x) |
|
|
|
\par Shell/Execute Command... (Alt+x) |
|
|
@ -934,7 +934,7 @@ undone, however. |
|
|
|
|
|
|
|
|
|
|
|
<!-- NEW PAGE --> |
|
|
|
<!-- NEW PAGE --> |
|
|
|
|
|
|
|
|
|
|
|
\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 |
|
|
|
\image latex fluid_widget_gui.png "The FLUID widget GUI attributes" width=10cm |
|
|
|
|
|
|
|
|
|
|
|
\section fluid_widget_attributes GUI Attributes |
|
|
|
\section fluid_widget_attributes GUI Attributes |
|
|
@ -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 |
|
|
|
On most (all?) window managers you will have to close the window |
|
|
|
and reopen it to see the effect. |
|
|
|
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 |
|
|
|
\image latex fluid_widget_style.png "The FLUID widget Style attributes" width=10cm |
|
|
|
|
|
|
|
|
|
|
|
\subsection fluid_style_attributes Style Attributes |
|
|
|
\subsection fluid_style_attributes Style Attributes |
|
|
@ -1120,7 +1120,7 @@ when they have the focus. |
|
|
|
Some widgets display text, such as input fields, pull-down |
|
|
|
Some widgets display text, such as input fields, pull-down |
|
|
|
menus, and browsers. |
|
|
|
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 |
|
|
|
\image latex fluid_widget_cxx.png "The FLUID widget C++ attributes" width=10cm |
|
|
|
|
|
|
|
|
|
|
|
\subsection fluid_cpp_attributes C++ Attributes |
|
|
|
\subsection fluid_cpp_attributes C++ Attributes |
|
|
@ -1499,7 +1499,7 @@ fields will then appear to control the include file and |
|
|
|
function/macro name to use when retrieving the localized label |
|
|
|
function/macro name to use when retrieving the localized label |
|
|
|
strings. |
|
|
|
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 |
|
|
|
\image latex fluid-gettext.png "Internationalization using GNU gettext" width=10cm |
|
|
|
|
|
|
|
|
|
|
|
The \b \#include |
|
|
|
The \b \#include |
|
|
@ -1524,7 +1524,7 @@ input fields will then appear to control the include file, |
|
|
|
catalog file, and set number for retrieving the localized label |
|
|
|
catalog file, and set number for retrieving the localized label |
|
|
|
strings. |
|
|
|
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 |
|
|
|
\image latex fluid-catgets.png "Internationalization using POSIX catgets" width=10cm |
|
|
|
|
|
|
|
|
|
|
|
The \b \#include |
|
|
|
The \b \#include |
|
|
|