From b983b285cc4f0627a1f72c9d6c510047af0ad116 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Tue, 26 Jan 1999 21:36:02 +0000 Subject: Lots of documentation fixes, and added a new image for the Fluid chapter. git-svn-id: file:///fltk/svn/fltk/trunk@244 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/subclassing.html | 99 +++++++++++++++++++++++++----------------- 1 file changed, 60 insertions(+), 39 deletions(-) (limited to 'documentation/subclassing.html') diff --git a/documentation/subclassing.html b/documentation/subclassing.html index 5951f0305..7ccf44fb9 100644 --- a/documentation/subclassing.html +++ b/documentation/subclassing.html @@ -5,12 +5,12 @@ widgets in FLTK.

Subclassing

New widgets are created by subclassing an existing FLTK widget, typically Fl_Widget for controls and Fl_Group for -containers. +composite widgets.

A control widget typically interacts with the user to receive and/or display a value of some sort.

-

A container widget holds a list of child widgets and handles moving, +

A composite widget widget holds a list of child widgets and handles moving, sizing, showing, or hiding them as needed. Fl_Group is the -main container widget class in FLTK, and all of the other containers ( +main composite widget widget class in FLTK, and all of the other composite widgets ( Fl_Pack, Fl_Scroll, Fl_Tabs, Fl_Tile, and Fl_Window) are subclasses of it.

You can also subclass other existing widgets to provide a different @@ -23,13 +23,13 @@ the face of the button.

subclass of Fl_Widget. Fl_Widget has only four virtual methods, and overriding some or all of these may be necessary.

The Constructor

- The constructor should access the following arguments: + The constructor should have the following arguments: - This will allow the class to be used in Fluid + This will allow the class to be used in FLUID without problems.

The constructor must call the constructor for the base class and pass the same arguments:

@@ -41,8 +41,8 @@ MyClass::MyClass(int x, int y, int w, int h, const char *label) } -Fl_Widget's protected constructor sets x(), y() -, w(), h(), and label() to the passed values +Fl_Widget's protected constructor sets x(), y(), +w(), h(), and label() to the passed values and initializes the other instance variables to: