From 0e6e2393bfc7eeaa47b8a2ebd6c2023f560d7a90 Mon Sep 17 00:00:00 2001
From: Michael R Sweet
Date: Fri, 28 Apr 2000 18:15:26 +0000
Subject: Typos reported by Alexander Mai
Fl_Browser_ docos finished.
Added Fl_Group::init_sizes() description.
Added links for common widgets in chapter 3 (?)
Fixed formatting problems in subclassing and FLUID chapters.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1100 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
---
documentation/basics.html | 31 +++++++++++++++++++------------
1 file changed, 19 insertions(+), 12 deletions(-)
(limited to 'documentation/basics.html')
diff --git a/documentation/basics.html b/documentation/basics.html
index b31186dc7..9d48c5751 100644
--- a/documentation/basics.html
+++ b/documentation/basics.html
@@ -65,8 +65,8 @@ better and can be used with the "optimized for speed" setting.
program must include a header file for each FLTK class it uses.
Listing 1 shows a simple "Hello, World!" program that uses FLTK to
display the window.
-Listing 1 - "hello.cxx"
-
+
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
@@ -123,7 +123,7 @@ program by closing the window or pressing the ESCape key.
most widgets the arguments to the constructor are:
-Fl_Widget(x, y, width, height)
+Fl_Widget(x, y, width, height, label)
The x and y parameters determine where the widget
@@ -135,9 +135,9 @@ of the widget or window in pixels. The maximum widget size is
typically governed by the underlying window system or hardware.
label is a pointer to a character string to label the
widget with or NULL. If not specified the label defaults to
-NULL. The label string must be in static storage (such as a
-string constant) because FLTK does not make a copy of it (it just uses
-the pointer).
+NULL. The label string must be in static storage such as a
+string constant because FLTK does not make a copy of it - it just uses
+the pointer.
Get/Set Methods
box->box(FL_UP_BOX) sets the type of box the
Fl_Box draws, changing it from the default of FL_NO_BOX, which means
@@ -150,13 +150,16 @@ Chapter 3.
short names for get/set methods. A "set" method is always of the form
"void name(type)", and a "get" method is always of the form
"type name() const".
-Almost all of these set/get pairs are very fast and short inline
+
+
Redrawing After Changing Attributes
+Almost all of the set/get pairs are very fast, short inline
functions and thus very efficient. However, the "set" methods do
-not call redraw(), you have to call it yourself. This greatly
+not call redraw() - you have to call it yourself. This greatly
reduces code size and execution time. The only common exception is
-value(), this does redraw() if necessary.
+value() which calls redraw() if necessary.
+
Labels
- All widgets support labels. In the case of window widgets, the label
+All widgets support labels. In the case of window widgets, the label
is used for the label in the title bar. Our example program calls the
labelfont,
labelsize, and
@@ -166,9 +169,11 @@ used for the label, which for this example we are using FL_BOLD
and FL_ITALIC. You can also specify typefaces directly.
The labelsize method sets the height of the font in pixels.
The labeltype method sets the type of label. FLTK supports
-normal, embossed, shadowed, symbol, and image labels.
+normal, embossed, shadowed, symbol, and image labels internally, and
+more types can be added as desired.
A complete list of all label options can be found in
Chapter 3.
+
Showing the Window
The show() method shows the widget or window. For windows
you can also provide the command-line arguments to allow users to
@@ -183,4 +188,6 @@ while (Fl::wait());
Fl::run() does not return until all of the windows under FLTK
-control are closed (either by the user or your program).