X11PixelCanvasApp.h

Classes

X11PixelCanvasApp -- Application class the provides basic gui for a PixelCanvas (full description)

class X11PixelCanvasApp

Types

enum

X11PixelCanvasAppVersion = 1

Interface

Public Members
X11PixelCanvasApp()
void init()
virtual void XtAppInitHook(Screen * screen, XtAppContext * app)
virtual Widget makeShellWidget(Widget parent, X11PixelCanvasColorTable * xpcct)
virtual Widget makeGUI(Widget parent)
virtual X11PixelCanvasColorTable *makePixelCanvasColorTable(Screen *screen)
virtual X11PixelCanvas * makePixelCanvas(Widget parent, X11PixelCanvasColorTable * pcct)
void addRefreshEventHandler(const PCRefreshEH & eh)
void addMotionEventHandler(const PCMotionEH & eh)
void addPositionEventHandler(const PCPositionEH & eh)
PixelCanvas * pixelCanvas()
void run()
static void exitCB(Widget, XtPointer, XtPointer)
static void refreshCB(Widget, XtPointer, XtPointer)
virtual ~X11PixelCanvasApp()
friend ostream & operator << (ostream & os, const X11PixelCanvasApp & spca)
friend AipsIO &operator<<(AipsIO &aio, const X11PixelCanvasApp & spca)
friend LogIO &operator<<(LogIO &lio, const X11PixelCanvasApp & spca)
friend AipsIO &operator>>(AipsIO &aio, X11PixelCanvasApp & spca)
Bool ok() const

Description

Prerequisite

Etymology

X11PixelCanvasApp : PixelCanvas Application Class

Synopsis

X11PixelCanvasApp provides basic a basic GUI panel for a PixelCanvas application. Event handlers can be registered to the app class.

Motivation

Needed testbed for the PixelCanvas

Example

See the test programs in Display

Member Description

X11PixelCanvasApp()

Default Constructor Required

void init()

required because init calls virtual funcs

virtual void XtAppInitHook(Screen * screen, XtAppContext * app)

initialization hook after XtVaAppInit..

virtual Widget makeShellWidget(Widget parent, X11PixelCanvasColorTable * xpcct)

function that creates the shell widget

virtual Widget makeGUI(Widget parent)

function that makes the application's GUI and return a widget to serve as the parent to the pixel canvas

virtual X11PixelCanvasColorTable *makePixelCanvasColorTable(Screen *screen)

function to make the PixelCanvasColorTable

virtual X11PixelCanvas * makePixelCanvas(Widget parent, X11PixelCanvasColorTable * pcct)

function to make the PixelCanvas

void addRefreshEventHandler(const PCRefreshEH & eh)
void addMotionEventHandler(const PCMotionEH & eh)
void addPositionEventHandler(const PCPositionEH & eh)

functions to add event handlers to the pixel canvas

PixelCanvas * pixelCanvas()

Direct access to the PixelCanvas

void run()

Run the program

static void exitCB(Widget, XtPointer, XtPointer)

X callback to quit the program

static void refreshCB(Widget, XtPointer, XtPointer)

virtual ~X11PixelCanvasApp()

Destructor

friend ostream & operator << (ostream & os, const X11PixelCanvasApp & spca)

Write a X11PixelCanvasApp to an ostream in a text form.

friend AipsIO &operator<<(AipsIO &aio, const X11PixelCanvasApp & spca)

Write a X11PixelCanvasApp to an AipsIO stream in a binary format.

friend LogIO &operator<<(LogIO &lio, const X11PixelCanvasApp & spca)

Write a X11PixelCanvasApp to a LogIO stream.

friend AipsIO &operator>>(AipsIO &aio, X11PixelCanvasApp & spca)

Read a X11PixelCanvasApp from an AipsIO stream in a binary format. Will throw an AipsError if the current X11PixelCanvasApp Version does not match that of the one on disk.

Bool ok() const

Is this X11PixelCanvasApp consistent?

enum