TkPixelCanvas.h

Classes

TkPixelCanvas -- Tk interface for PixelCanvas (full description)

class TkPixelCanvas

Types

enum FlagVals

widget_configured_ = 0x01,redraw_required_=0x02,redraw_window_=0x04,update_pending_=0x08

Interface

Public Members
static int init(Tcl_Interp *)
TkPixelCanvas(Tcl_Interp *interp, char *path)
static int ClassCmd(ClientData, Tcl_Interp *, int, char **)
static int WidgetCmd(ClientData, Tcl_Interp *, int, char **)
int configureWidget(Tcl_Interp *, int, char **)
static void HandleWidgetEvent(ClientData, XEvent *)
void invalidateWindow()
void scheduleUpdate()
static void UpdateWidget(ClientData)
void update()
void resizeHandler(XEvent *)
void exposeHandler()
void focus(int)
int windowExists()
int widgetConfigured()
int updatePending()
int redrawRequired()
int redrawWindow()
int width()
int height()
Tk_Window tkWindow()

Description

Review Status

Date Reviewed:
yyyy/mm/dd

  • Tk
  • PixelCanvas

    Synopsis

    This class manages some native TclTk interface for the Display Library PixelCanvas. It is practically identical with TclTkPixelCanvas. It will be cleaned up and absorbed soon into XTkPixelCanvas.

    Example

    Motivation

    Putting X11PixelCanvas on top of Tk

    To Do

    Member Description

    static int init(Tcl_Interp *)

    TkPixelCanvas(Tcl_Interp *interp, char *path)

    Constructor; instances of this class should only be constructed by the static member TkPixelCanvas::ClassCmd.

    static int ClassCmd(ClientData, Tcl_Interp *, int, char **)

    This static member is registered with Tcl to be called when the user creates a widget of this type.

    static int WidgetCmd(ClientData, Tcl_Interp *, int, char **)

    This static member is registered with Tcl to be called when the user invokes an operation on a widget of this type. It is registered by TkPixelCanvas::ClassCmd.

    int configureWidget(Tcl_Interp *, int, char **)

    Configure the widget using Tcl-style arguments.

    static void HandleWidgetEvent(ClientData, XEvent *)

    Handle events in which the Tk side of things is interested:

    void invalidateWindow()
    void scheduleUpdate()
    static void UpdateWidget(ClientData)
    void update()

    A set of methods to arrange the invalidation of the current window display, and arrange for appropriate update.

    void resizeHandler(XEvent *)

    Handle resizing:

    void exposeHandler()

    Handle exposure:

    void focus(int)

    Update the focus state of the visual widget:

    int windowExists()

    Does the Tk window exist?

    int widgetConfigured()

    Has the widget been configured already?

    int updatePending()

    Is an update waiting to be serviced?

    int redrawRequired()

    Is a redraw needed?

    int redrawWindow()

    Should we redraw the window?

    int width()
    int height()

    width and height of widget

    Tk_Window tkWindow()

    What is the Tk_Window?

    enum FlagVals