XTkPixelCanvas.h

Classes

XTkPixelCanvas -- X Tk implementation of the PixelCanvas (full description)

class XTkPixelCanvas : public DisplayOptions, public X11PixelCanvas

Interface

Public Members
XTkPixelCanvas(Tcl_Interp* tcl, String tkpath, String<Int> mincolors, String<Int> maxcolors, String maptype="index", String width="0", String height="0", String relief="raised", String borderwidth="0", String background="black")
~XTkPixelCanvas()
void fillColorTableSizeRecord(Record &rec) const
virtual void refresh(const Display::RefreshReason &reason = Display::UserCommand, const Bool& explicitrequest = True)
static Int evalTcl(Tcl_Interp* tcl, const String& cmdStr)
Protected Members
static void HandleWidgetEvent(ClientData, XEvent *)
static void ColorTableResizeCB(PixelCanvasColorTable *, uInt, void *, Display::RefreshReason reason)
void exposeHandler_(Display::RefreshReason reason = Display::PixelCoordinateChange)
Bool resize_()
void initCanvas()
void initColorTable(Display::ColorModel colormodel, Vector<Int> mincolors, Vector<Int> maxcolors)
Bool windowExists()
virtual Bool refreshAllowed() const

Description

Review Status

Date Reviewed:
yyyy/mm/dd

  • TkPixelCanvas
  • X11PixelCanvas

    Synopsis

    This class was sculpted from GTkPixelCanvas (with an axe). It uses TkPixelCanvas (and probably should be combined with it) to set up a Tk custom widget, building the X11PixelCanvas onto that (as GTkPixelCanvas does). However, it does not use glish; that functional interface / event framework has been ripped out, and will have to be replaced with a new framework/interface (yet TBD).

    Example

    Motivation

    This class is motivated by the desire to operate the Display Library within Tk, but independently of glish. The PixelCanvas is the fundamental drawing machine of the Display Library.

    Member Description

    XTkPixelCanvas(Tcl_Interp* tcl, String tkpath, String<Int> mincolors, String<Int> maxcolors, String maptype="index", String width="0", String height="0", String relief="raised", String borderwidth="0", String background="black")

    Constructor; this should only be called from within the static method XTkPixelCanvas::Create, which is registered with GlishTk to build widgets of this type.

    ~XTkPixelCanvas()

    Destructor; this is used to unmap the widget from the display, and destroy its contents.

    void fillColorTableSizeRecord(Record &rec) const

    fill in a record describing the current color allocation state and capacity.

    virtual void refresh(const Display::RefreshReason &reason = Display::UserCommand, const Bool& explicitrequest = True)

    Refresh the PixelCanvas - this will cascade the event to all registered refresh handlers, provided the refresh event handling is not suspended void refresh(Display::RefreshReason reason = Display::UserCommand);

    static Int evalTcl(Tcl_Interp* tcl, const String& cmdStr)

    static void HandleWidgetEvent(ClientData, XEvent *)

    static void ColorTableResizeCB(PixelCanvasColorTable *, uInt, void *, Display::RefreshReason reason)

    void exposeHandler_(Display::RefreshReason reason = Display::PixelCoordinateChange)

    Bool resize_()

    void initCanvas()

    void initColorTable(Display::ColorModel colormodel, Vector<Int> mincolors, Vector<Int> maxcolors)

    Bool windowExists()

    virtual Bool refreshAllowed() const