*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> Vk/VkDoubleBuffer (3)              
Title
Content
Arch
Section
 

Contents


VkDoubleBuffer(3x)					    VkDoubleBuffer(3x)


NAME    [Toc]    [Back]

     VkDoubleBuffer - Abstract class supports classes that draw	doublebuffered
 graphics

INHERITS FROM    [Toc]    [Back]

     VkComponent : VkCallbackObject

HEADER FILE    [Toc]    [Back]

     #include <Vk/VkDoubleBuffer.h>

PUBLIC PROTOCOL	SUMMARY
   Constructor/Destructor
	   VkDoubleBuffer(const	char* name, Widget parent);
	   virtual void	~VkDoubleBuffer(void);


   Switching Buffers    [Toc]    [Back]
	   virtual void	update(void);

PROTECTED PROTOCOL SUMMARY    [Toc]    [Back]

   Resizing and	Refreshing the Canvas
	   virtual void	resize(void);
	   virtual void	draw(void) = 0;


   Protected Data Members    [Toc]    [Back]
	   Pixmap _canvas;


	   Dimension _width;


	   Dimension _height;

CLASS DESCRIPTION    [Toc]    [Back]

	  This class provides support for classes that need to display double
	  buffered graphics.  The public interface allows applications to
	  drive	animations by calling the update() member function at the
	  desired interval. The	VkDoubleBuffer class calls derived classes'
	  draw() member	function when the derived class	needs to draw a	new
	  frame.  Derived classes do not need to worry about handling window
	  damage, as the VkDoubleBuffer	class takes care of this
	  automatically.


DERIVING SUBCLASSES    [Toc]    [Back]

	  Derived classes must define the draw member function.	This member
	  function is expected to display some Xlib text or Xlib graphics by
	  drawing to the _canvas member, which is a Drawable. The derived



									Page 1






VkDoubleBuffer(3x)					    VkDoubleBuffer(3x)



	  class	is always drawing to the back buffer, although derived classes
	  do not need to be aware of this.

	  Derived classes that need to know when the window has	been resized
	  can override the virtual function resize() to	be notified.


FUNCTION DESCRIPTIONS    [Toc]    [Back]

   resize()
	   virtual void	resize(void);


	  Called when the object's drawable area changes size. The new size
	  can be accessed in the _width	and _height members.

   draw()
	   virtual void	draw(void) = 0;


	  This pure virtual function must be defined by	derived	classes. The
	  function is expected to use Xlib calls to display graphics in	the
	  _canvas Drawable.

   VkDoubleBuffer()    [Toc]    [Back]
	   VkDoubleBuffer(const	char* name, Widget parent);


	  Initialize the VkDoubleBuffer	class and create various widgets and
	  Pixmaps used to support the double buffering.

   ~VkDoubleBuffer()
	   virtual void	~VkDoubleBuffer(void);


	  Destroys the pixmaps and graphics contexts used by this class.

   update()
	   virtual void	update(void);


	  Displays the current back buffer of the double-buffered display and
	  requests the derived class to	redraw a new back buffer.

DATA MEMBER DESCRIPTIONS    [Toc]    [Back]

   _canvas
	   Pixmap _canvas;


	  Derived classes always draw to this Drawable.	The VkDoubleBuffer
	  class	copies the contents of this Pixmap as needed.




									Page 2






VkDoubleBuffer(3x)					    VkDoubleBuffer(3x)



   _width
	   Dimension _width;


	  The current width of the available drawing area.

   _height
	   Dimension _height;


	  The current height of	the available drawing area.

EXAMPLE    [Toc]    [Back]

INHERITED MEMBER FUNCTIONS    [Toc]    [Back]

   Inherited from VkComponent
	  installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(),
	  setDefaultResources(), getResources(), callCallbacks(),
	  VkComponent(), manage(), unmanage(), baseWidget(), okToQuit(),
	  _name, _baseWidget, _w, deleteCallback


   Inherited from VkCallbackObject    [Toc]    [Back]
	  callCallbacks(), addCallback(), removeCallback(),
	  removeAllCallbacks()

KNOWN DERIVED CLASSES    [Toc]    [Back]

     VkMeter, VkPie

CLASSES	USED BY	THIS CLASS
     VkApp

SEE ALSO    [Toc]    [Back]

      
      
     VkComponent, VkApp
     ViewKit Programmer's Guide
     The X Window System, DEC Press, Bob Sheifler and Jim Gettys
     The X Window System Toolkit, DEC Press, Paul Asente and Ralph Swick
     The OSF/Motif Programmers Reference, Prentice Hall, OSF


									PPPPaaaaggggeeee 3333
[ Back ]
 Similar pages
Name OS Title
VkCallbackObject IRIX An abstract class that supports classes that use C++ member function callbacks
VkMenuItem IRIX Abstract base class for all ViewKit menu classes
VkPrefItem IRIX Abstract class that supports preference items
VkGenericDialog IRIX An abstract class that supports custom dialog managers
VkDialogManager IRIX An abstract manager class that caches and supports Motif dialogs
VkModel IRIX An abstract class that supports Model-View-Controller style applications
VkComponent IRIX Abstract base class for all ViewKit components
class_get_classes Tru64 get classes for a class scheduling database
VkMsgComponent IRIX Abstract base class for all ViewKit message components
UNIVERSAL IRIX base class for ALL classes (blessed references)
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service