Frame(3X) manual page
Table of Contents
Frame - place a Motif bevelled frame around an interactor
#include
<ivplus/frame.h>
Frame outlines another interactor with a bevelled
border of a given style. The most common styles are: bevelled in, bevelled
out, etched in, and etched out. Two more styles are also supported for special
purposes: a BevelType of BevelHighlight is used by Control(Menu) classes;
and a BevelType of BevelNone will draw a frame with the current background
color. A frame is used to provide a decorative border or to visually group
components for the user.
Frame->IVFrame->MonoScene->Scene->Interactor
Construct a bevelled frame. If the given interactor is not nil,
it is inserted as the frame’s component. The frame extends width pixels outside
of the interactor. If width is 0, the actual width will be the value of
the shadowThickness X resource, which defaults to 2.
This call is only valid when the
frame has a BevelType of BevelHighlight. If it does, passing true will
cause the frame to be drawn bevelled out. Passing false will cause the
frame to be drawn with the current background color.
Inserts
an interactor into the frame.
Sets the bevel type
of the frame to BevelType.
Stores the style
of the bevel.
Used to determine whether or not the frame
should be drawn as highlighted.
Stores the width in pixels.
Calls IVFrame::Reconfig() and
recalculates the shape of the frame.
Draws the frame based on
the indicated BevelType.
None.
// Frame Example
#include <ivplus/box.h>
#include <ivplus/frame.h>
#include <ivplus/glue.h>
#include <ivplus/message.h>
#include <ivplus/world.h>
int main(int argc, char **argv)
{
// Create the world to get the connection with the display.
World* world = new World("MyApp", argc, argv);
Message* msg = new Message("This is a Framed \n Message");
// Outline the message with two frames of width = 2 pixels
// (inner one BevelIn, the outer one BevelOut).
Frame* fin = new Frame(msg, 2, BevelIn);
Frame* fout = new Frame(fin, 2, BevelOut);
// Enclose the framed msg in a box with glues around it.
VBox* mainbox = new VBox(new VGlue(10), new HBox(new HGlue(10), fout,
new HGlue(10)),
new VGlue(10));
// Map the window.
world->InsertApplication(new Frame(mainbox, 1, BevelOut));
// Enter the event loop.
world->Run();
return 0;
}
frame.h
frame.C
BorderFrame(3X)
, Event(3X)
, IVFrame(3X)
, Interactor(3X)
, MarginFrame(3X)
,
MonoScene(3X)
, Scene(3X)
, ShadowFrame(3X)
, ShowFrame(3X)
, TitleFrame(3X)
.
Table of Contents