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

Name

TitleFrame - place a frame around an interactor and a banner above it

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.

Synopsis

#include <ivplus/frame.h>

Description

TitleFrame is a ShowFrame subclass that outlines another interactor with a border and places a banner above it.

Class Hierarchy

TitleFrame->ShowFrame->IVFrame->MonoScene->Scene->Interactor

Constructors

TitleFrame(Banner*, Interactor* = nil, int width = 1)

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

Construct a titleframe. The given banner is placed above the interactor (See Banner(3X) ). If the given interactor is not nil, it is inserted as the frame’s component. The frame extends width pixels outside of the interactor.

Public Operations

virtual void InsideFrame(boolean)

When true, this highlights the banner in the titleframe. When false, it unhighlights the banner.

Protected Operations

virtual Interactor* Wrap(Interactor*);

Composes the banner, an hborder, and the component interactor into an ivframe.

X Resources

None.

Examples


//                          TitleFrame Example
#include <ivplus/box.h>
#include <ivplus/banner.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("TitleFrame is a ShowFrame that\n"
                               "outlines another interactor and\n"
                               "places a banner above the it.");
   // Create a banner with three header strings and reversed video.
   Banner* banner = new Banner(" Ver1.0 ", " TitleFrame ", " Page 1 ");
   banner->highlight = true;
   // Create a title frame with the banner and the message created above.
   TitleFrame* tframe = new TitleFrame(banner, msg1, 3);
   // Create glues 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 glues around it.
   VBox* mainbox = new VBox(new VGlue(10), new HBox(new VGlue(10), tframe,

                                                    new VGlue(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

Banner(3X) , BorderFrame(3X) , Frame(3X) , Interactor(3X) , IVFrame(3X) , MarginFrame(3X) , MonoScene(3X) , Scene(3X) , ShowFrame(3X) .


Table of Contents