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

Name

ShadowFrame - place a dropped shadow 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

ShadowFrame is an IVFrame subclass that outlines another interactor using a dropped shadow.

Class Hierarchy

ShadowFrame->IVFrame->MonoScene->Scene->Interactor

Constructors

ShadowFrame(Interactor* = nil, int h = 1, int v = 1)

ShadowFrame(const char* instanceName, Interactor* = nil, int h = 1, int v = 1)

Construct a shadowframe. If the given interactor is not nil, it is inserted as the frame’s component. The frame’s drop shadow extends h pixels below the interactor and v pixels to the right of the interactor to produce the shadow effect.

Public Operations

Scene::Insert(Interactor*)

Inserts an interactor into the shadowframe.

Protected Operations

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

Redraws the shadowframe, drawing the border of the frame first followed by filling in the frame to create the shadowed appearance.

X Resources

None.

Examples


//                          ShadowFrame 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);
   
   // Create three messages.
   Message* msg1 = new Message("Hello");
   Message* msg2 = new Message("Hello World");
   Message* msg3 = new Message("This is Line 1\nThis is Line 2");
  
   // Enclose msg1 in a shadow frame with default settings h=1, v=1.
   ShadowFrame* sframe1 = new ShadowFrame(msg1);
  
   // Enclose msg2 in a shadow frame with both horizontal and vertical

   // thickness = 5.
   ShadowFrame* sframe2 = new ShadowFrame(msg2, 5, 5);
   // Enclose msg3 in a shadow frame with horizontal thickness = 2 and
vertical
   // thickness = 8.
   ShadowFrame* sframe3 = new ShadowFrame(msg3, 2, 8);
   // Enclose all of these frames in a vbox.
   VBox* appbox = new VBox(sframe1, new VGlue(), sframe2, new VGlue(),
sframe3);
   // Map the window.
   world->InsertApplication(new Frame(appbox, 1, BevelOut));
   // Enter the event loop.
   world->Run();
   return 0;
}

Files


frame.h
frame.C

See Also

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


Table of Contents