[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    IVFrame(3X) manual page Table of Contents

Name

IVFrame - place a border around an interactor

Remarks:

This interactor does not comply with the OSF/Motif Certification Checklist. It is provided for compatibility with existing InterViews programs, however it may not behave as expected when used with InterViews Plus. See Frame(3X) for an interactor that satisfies the Checklist’s requirements.

Synopsis

#include <ivplus/frame.h>

Description

IVFrame outlines another interactor with a border of a given width in the current foreground color.

Class Hierarchy

IVFrame->MonoScene->Scene->Interactor

Constructors

IVFrame (Interactor* = nil, int width = 1);

Frame(const char* instanceName, Interactor* = nil, int width = 1)

Construct a 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.

Frame(Interactor*, int l, int b, int r, int t)

Frame(const char* instanceName, Interactor*, int l, int b, int r, int t)

These protected constructors are used by classes derived from IVFrame to explicitly set the width of each line.

Public Operations

None.

Protected Operations

virtual void Reconfig()

Calls MonoScene::Reconfig() and recalculates the shape of the frame.

virtual void Redraw(IntCoord left, IntCoord bottom, IntCoord right, IntCoord top)

Draws the frame.

virtual void Resize()

Notifies an interactor that its canvas has been created or modified.

X Resources

None.

Examples


//                          IVFrame 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 a IVFrame of width = 2 pixels.
   IVFrame* ivframe = new IVFrame(msg, 2);
   // Create glue with natural size of 10 and infinite stretchability.
   VGlue* vglue = new VGlue(10);
   HGlue* hglue = new HGlue(10);
   // Enclose the framed msg in a box with glue around it.
   VBox* mainbox = new VBox(new VGlue(10), new HBox(new HGlue(10), ivframe,

                                                    new HGlue(10)),
                            new VGlue(10));
   // Map the window.
   world->InsertApplication(new Frame(mainbox, 1, BevelOut));
   // Enter the event loop.
   world->Run();
   return 0;
}

Files


frame.h
frame.C

See Also

BorderFrame(3X) , Event(3X) , IVFrame(3X) , Interactor(3X) , MarginFrame(3X) , MonoScene(3X) , Scene(3X) , ShadowFrame(3X) , ShowFrame(3X) , TitleFrame(3X) .


Table of Contents