-
This class represents the abstraction of a graphical user interface
window. A Frame can logically contain any number of non-overlapping
Panels and Canvases within its boundaries. The Panel and Canvas
constructors create an association between themselves and a Frame.
The methods of the Frame class allow the window
to be moved on the user's display and its shape changed.
Each Frame is given a name that is appears on the title bar of the
visible window.
The location of a Frame on the user's display is measured in a
coordinate system where the upper left-hand corner of the display is
the coordinates (0,0), the x-axis is the top of the display with higher
x values to the right, and the y-axis is the left edge of the display
with higher values nearer the bottom of the display.
The shape of a Frame is given by it width and height, both measures
in pixels.
[
Index |
Source |
Summary | Member Functions ]
Class Summary
class Frame
{
public:
- Frame(char *name, Location loc, Shape sh);
- Frame(char* name, Location loc);
- Frame(char* name, Shape sh);
- Frame(char* name);
- Frame();
- ~Frame();
- void MoveTo(Location location);
- void Resize(Shape shape);
- void Resize( float factor);
- int IsNamed(char* n);
}; // Frame
Back to the top of Frame
Frame(char *name, Location loc, Shape sh);
Construct a Frame object specifying the Frame's name, its location -
the x and y coordinates, and its shape - its width and height.
- name this string defines the name of the Frame. This string
will
appear on the top border of the window on the user's
display and, when a mouse event occurs in a window, this
name will be passed to the OnMouseEvent method so that the
program will know in which Frame the event occured.
- location the coordinates of where the Frame's upper left-hand
corner is located on the user's
display relative to the upper left-hand corner of the display.
- shape the height and width of the Frame, measured in pixels.
Frame(char *name, Location loc, Shape sh);
Back to the top of Frame
Frame(char* name, Location loc);
Construct a Frame object specifying the Frame's name, and its Location.
The Frame is constructed with a default Shape.
- name this string defines the name of the Frame. This string
will
appear on the top border of the window on the user's
display and, when a mouse event occurs in a window, this
name will be passed to the OnMouseEvent method so that the
program will know in which Frame the event occured.
- location the coordinates of where the Frame's upper left-hand
corner is located on the user's
display relative to the upper left-hand corner of the display.
Frame(char* name, Location loc);
Back to the top of Frame
Frame(char* name, Shape sh);
Construct a Frame object specifying the Frame's name, and its Shape.
The Frame is constructed at a default Location.
- name this string defines the name of the Frame. This string
will
appear on the top border of the window on the user's
display and, when a mouse event occurs in a window, this
name will be passed to the OnMouseEvent method so that the
program will know in which Frame the event occured.
- shape the height and width of the Frame, measured in pixels.
Frame(char* name, Shape sh);
Back to the top of Frame
Frame(char* name);
Construct a Frame object specifying the Frame's name. Both the Location
and the Shape of the Frame are determined by defaults.
- name this string defines the name of the Frame. This string
will
appear on the top border of the window on the user's
display and, when a mouse event occurs in a window, this
name will be passed to the OnMouseEvent method so that the
program will know in which Frame the event occured.
Frame(char* name);
Back to the top of Frame
Frame();
Construct a Frame object specifying. The Frame's name, its Location, and
its Shape are given default values.
Frame();
Back to the top of Frame
~Frame();
Destructor: frees resources when Frame object is deleted
~Frame();
Back to the top of Frame
void MoveTo(Location location);
Move the Frame's visible window to a specified Location.
- location: the new position of the upper left-hand
corner of the Frame's visible window.
void MoveTo(Location location);
Back to the top of Frame
void Resize(Shape shape);
Change the dimensions of the Frame's visible window to a
specified Shape.
- shape: the new dimensons for the window.
void Resize(Shape shape);
Back to the top of Frame
void Resize( float factor);
Change the dimensions of the Frame's visible window by multiplying
each dimension by a given amount.
- factor: the amount by which the window's height and
width are multiplied. If factor > 1, the window will increase in
size. If factor < 1, the window will decrease in size.
void Resize( float factor);
Back to the top of Frame
int IsNamed(char* n);
Reply if the given string is equal to the name of the Frame.
- name: Return 1 if this string matches the name given
to the Frame when the Frame was constructed. Return 0 otherwise.
int IsNamed(char* n);
Back to the top of Frame
Member Functions
- public:
- void MoveTo(Location location);
- void Resize(Shape shape);
- void Resize( float factor);
- int IsNamed(char* n);
Back to the top of Frame
Generated from source by the Cocoon utilities on Thu Apr 02 12:40:05 1998
.
Report problems to jkotula@unimax.com