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

Name

BorderFrame - place an input sensitive frame around an interactor

Remarks:

There is no corresponding Motif widget for this interactor. It may not be suitable for Motif user interface design.

Synopsis

#include <ivplus/frame.h>

Description

BorderFrame places a border around its component when the mouse pointer is inside the BorderFrame’s canvas.

Class Hierarchy

BorderFrame -> ShowFrame -> IVFrame -> MonoScene- -> Scene->Interactor

Constructors

BorderFrame(Interactor* = nil, int width = 1)

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

Construct a border frame. If the given interactor is not nil, it is inserted as the frame’s component. The border frame extends width pixels outside of the interactor. The border frame changes when it has input focus. The frame will be drawn using a solid line when it contains the input focus and a gray line otherwise.

Public Operations

void Scene::Insert(Interactor*)

Inserts an interactor into the border frame.

virtual void InsideFrame(boolean)

Sets whether or not the frame has input focus. If true, the frame will be drawn with a solid line, otherwise it will be drawn with a gray line.

Protected Operations

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

Calls ShadowFrame::Redraw().

X Resources

None.

Examples


//                          BorderFrame Example
#include <ivplus/box.h>
#include <ivplus/button.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);
  
   // Create a 2 pixel border frame around a push button.
   PushButton* btn = new PushButton("PushMe", new ButtonState(0), 1);
   BorderFrame* bframe1 = new BorderFrame(btn, 2);
  
   // Create a 4 pixel border frame around a message.
   BorderFrame* bframe2 = new BorderFrame(new Message("Hello World"), 4);
   // Create a vbox & insert these frames into it.
   VBox* mainbox = new VBox(new VGlue(10), bframe1, new VGlue(10), 
                            bframe2, 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

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


Table of Contents