ubit
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
ubit::UPaintEvent Class Reference

Paint event. More...

#include <uevent.hpp>

Inheritance diagram for ubit::UPaintEvent:
ubit::UViewEvent ubit::UEvent

Public Member Functions

 UPaintEvent (const UCond &, UView *source_view, const URect *win_clip=null)
 
virtual UPaintEventtoPaintEvent ()
 
bool isClipSet ()
 true if the clipping zone is vaild.
 
void getClip (URect &r) const
 returns the drawing zone relatively to the origin of getView(). More...
 
const URect getClip () const
 shortcut for getClip(URect& r).
 
virtual bool setSourceAndProps (UView *)
 
void setContext (UUpdateContext &c)
 
- Public Member Functions inherited from ubit::UViewEvent
 UViewEvent (const UCond &, UView *source_view)
 
virtual UViewEventtoViewEvent ()
 
UBoxgetSource () const
 returns the widget that received this event.
 
UViewgetView () const
 returns the view of getSource() that received this event.
 
UDispgetDisp () const
 returns the display that received this event. More...
 
- Public Member Functions inherited from ubit::UEvent
 UEvent (const UCond &c, UObject *source, UObject *aux=null)
 
const UCondgetCond () const
 returns the event condition that detected this event. More...
 
virtual UObjectgetAux () const
 returns auxilliary data.
 
virtual UInputEventtoInputEvent ()
 dynamic cast: returns 'this' converted to the requested class or null.
 
virtual UMouseEventtoMouseEvent ()
 
virtual UKeyEventtoKeyEvent ()
 
virtual UWheelEventtoWheelEvent ()
 
virtual UResizeEventtoResizeEvent ()
 
virtual UTimerEventtoTimerEvent ()
 
virtual UWinEventtoWinEvent ()
 
virtual UMessageEventtoMessageEvent ()
 
virtual USysWMEventtoSysWMEvent ()
 
virtual UUserEventtoUserEvent ()
 
void setCond (const UCond &)
 

Protected Member Functions

virtual void setProps (const class UViewContext &)
 

Protected Attributes

bool is_clip_set
 
URect redraw_clip
 
UUpdateContextcurrent_context
 
UViewlayout_view
 
- Protected Attributes inherited from ubit::UViewEvent
UViewsource_view
 
- Protected Attributes inherited from ubit::UEvent
const UCondcond
 
UObjectsource
 
UObjectaux
 

Friends

class UBox
 
class UDisp
 
class UGraph
 

Detailed Description

Paint event.

See also
:
  • condition UOn::paint that triggers callback functions when the view is repainted. These functions can have an optional UPaintEvent argument
  • UGraph for drawing Ubit graphics in these callback functions
  • UGraph::Glpaint drawing OpenGL graphics in these callback functions

Member Function Documentation

§ getClip()

void UPaintEvent::getClip ( URect r) const

returns the drawing zone relatively to the origin of getView().

returns (0, 0, getView()->width, getView()->height) if isClipSet() is false. and and empty rectangle if getView() is null


The documentation for this class was generated from the following files: