MarginFrame(3X) manual page
Table of Contents
MarginFrame - surround an interactor with glue (white space)
#include
<ivplus/frame.h>
MarginFrame constructs a margin of glue (white
space) around an interactor.
MarginFrame->IVFrame->MonoScene->Scene->Interactor
Construct a MarginFrame
for an interactor with margin pixels of fixed size glue around the interactor.
If the interactor is not nil it is inserted as the marginframe’s component.
Construct
a marginframe for an interactor with margin pixels of fixed size glue,
shrink shrinkability and stretch stretchability. These values apply to
both horizontal and vertical directions.
Construct a marginframe for an interactor with hmargin as
the horizontal margin and vmargin as the vertical margin.
Construct a marginframe for an interactor with hmargin as
the horizontal margin, hshrink as the horizontal shrinkability, hstretch
as the horizontal stretchability, vmargin as the vertical margin, vshrink
as the vertical shrinkability and vstretch as the vertical stretchability.
None.
Calls
IVFrame::Reconfig(), then calculates the shape of the marginframe.
Notifies the marginframe that its canvas has been created
or modified. Calculates the new size of the canvas and places the interior
interactor at new coordinates relative to the new size.
MarginFrame’s Redraw() operation does
nothing. It is provided to circumvent the Redraw() operation of its superclass,
IVFrame.
None.
// MarginFrame 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* msg1 = new Message("This is a Framed \n Message1");
// Outline the message with a margin frame (glue) of 4 pixels,
// shrinkability of 10 and stretchability of 80 pixels.
MarginFrame* mframe1 = new MarginFrame(msg1, 4, 10, 60);
Message* msg2 = new Message("This is a Framed \n Message2");
// Outline the message with a margin frame (glue) of 14 pixels
// horizontal margin and 30 pixels vertical margin.
// Remember that when desplayed, a ’Frame’ will not be drawn!.
MarginFrame* mframe2 = new MarginFrame(msg2, 14, 30);
// Enclose the mframe1, mframe2 in a frame.
VBox* mainbox = new VBox(new VGlue, new Frame(mframe1), new VGlue,
new Frame(mframe2), new VGlue);
// Map the window.
world->InsertApplication(new Frame(mainbox, 1, BevelOut));
// Enter the event loop.
world->Run();
return 0;
}
frame.h
frame.C
Glue(3X)
, Frame(3X)
, Interactor(3X)
, IVFrame(3X)
, MonoScene(3X)
,
Scene(3X)
.
Table of Contents
- Name
- Synopsis
- Description
- Class Hierarchy
- Constructors
- MarginFrame(Interactor* = nil, int margin = 0)
- MarginFrame(const char* instanceName, Interactor* = nil, int margin = 0)
- MarginFrame(Interactor*, int margin, int shrink, int stretch)
- MarginFrame(const char* instanceName, Interactor*, int margin, int shrink, int stretch)
- MarginFrame(Interactor*, int hmargin, int vmargin)
- MarginFrame(const char* instanceName, Interactor*, int hmargin, int vmargin)
- MarginFrame (Interactor*, int hmargin, int hshrink, int hstretch, int vmargin, int vshrink, int vstretch);
- MarginFrame (const char* instanceName, Interactor*, int hmargin, int hshrink, int hstretch, int vmargin, int vshrink, int vstretch);
- Public Operations
- Protected Operations
- X Resources
- Examples
- Files
- See Also