Planeshift
Classes | Public Member Functions | Protected Member Functions | Protected Attributes

pawsSketchWindow Class Reference

A window that shows a map or picture. More...

#include <pawsilluminationwindow.h>

List of all members.

Classes

class  BezierWeights
struct  SketchBezier
struct  SketchIcon
struct  SketchLine
struct  SketchObject
struct  SketchText

Public Member Functions

double CalcFunction (MathEnvironment *env, const char *functionName, const double *params)
 inherited from iScriptableVar from pawsWidget
virtual void Draw ()
 Draws the widget and all of it's children.
void DrawBlackBox (int x, int y)
void DrawColorWidgetText (const char *text, int x, int y, int color)
virtual bool GetFocusOverridesControls () const
 Test if the widget should intercept all key presses.
iGraphics2D * GetG2D ()
void HandleMessage (MsgEntry *message)
virtual void Hide ()
 Makes widget invisible and removes focus if widget has current focus.
bool IsMouseDown ()
void OnColorEntered (const char *name, int param, int color)
 inherited from iOnColorEnteredAction
virtual bool OnKeyDown (utf32_char keyCode, utf32_char key, int modifiers)
 Process keydown messages.
virtual bool OnMouseDown (int button, int modifiers, int x, int y)
 Manage mouse down event to test for and apply window changes.
virtual bool OnMouseUp (int button, int modifiers, int x, int y)
 Manage mouse up event.
void OnStringEntered (const char *name, int param, const char *value)
 inherited from iOnStringEnteredAction
 pawsSketchWindow (const pawsSketchWindow &origin)
 TODO: Copy constructor, useless currently. Would be implemented later.
 pawsSketchWindow ()
bool PostSetup ()
 This is called after the widget and all of it's children have been created.
virtual ~pawsSketchWindow ()

Protected Member Functions

void AddSketchBezier ()
void AddSketchIcon ()
void AddSketchLine ()
void AddSketchText ()
void ChangeSketchName ()
void DrawSketch ()
csString filenameSafe (const csString &original)
bool isBadChar (char c)
void LoadSketch ()
void MoveObject (int dx, int dy)
void NextPrevIcon (int delta)
bool ParseLimits (const char *xmlstr)
bool ParseSketch (const char *xml, bool checklimits=false)
void RemoveSelected ()
void SaveSketch ()
void SetToolbarButtons ()
csString toXML ()

Protected Attributes

pawsWidgetBezierTool
BezierWeights bezierWeights
csRef< iPawsImageblackBox
bool colorPending
pawsWidgetColorTool
uint32_t currentItemID
pawsWidgetDeleteTool
int dirty
bool editMode
pawsWidgetFeatherTool
int frame
csStringArray iconList
pawsWidgetLeftArrowTool
pawsWidgetLineTool
pawsWidgetLoadButton
bool mouseDown
int mouseDownX
int mouseDownY
pawsWidgetNameTool
csPDelArray< SketchObject > objlist
pawsWidgetPlusTool
int primCount
bool readOnly
pawsWidgetRightArrowTool
pawsWidgetSaveButton
size_t selectedIndex
csRef< iPawsImagesketchBgImage
 Background image.
csString sketchName
bool stringPending
pawsWidgetTextTool

Detailed Description

A window that shows a map or picture.

Definition at line 32 of file pawsilluminationwindow.h.


Constructor & Destructor Documentation

pawsSketchWindow::pawsSketchWindow ( )
pawsSketchWindow::pawsSketchWindow ( const pawsSketchWindow origin)

TODO: Copy constructor, useless currently. Would be implemented later.

virtual pawsSketchWindow::~pawsSketchWindow ( ) [virtual]

Member Function Documentation

void pawsSketchWindow::AddSketchBezier ( ) [protected]
void pawsSketchWindow::AddSketchIcon ( ) [protected]
void pawsSketchWindow::AddSketchLine ( ) [protected]
void pawsSketchWindow::AddSketchText ( ) [protected]
double pawsSketchWindow::CalcFunction ( MathEnvironment env,
const char *  functionName,
const double *  params 
) [virtual]

inherited from iScriptableVar from pawsWidget

Reimplemented from pawsWidget.

void pawsSketchWindow::ChangeSketchName ( ) [protected]
virtual void pawsSketchWindow::Draw ( ) [virtual]

Draws the widget and all of it's children.

Remarks:
Uses clipping rect of it's parent to define drawing area. If the drawing area defined is empty it returns.

Reimplemented from pawsWidget.

void pawsSketchWindow::DrawBlackBox ( int  x,
int  y 
)
void pawsSketchWindow::DrawColorWidgetText ( const char *  text,
int  x,
int  y,
int  color 
)
void pawsSketchWindow::DrawSketch ( ) [protected]
csString pawsSketchWindow::filenameSafe ( const csString &  original) [protected]
virtual bool pawsSketchWindow::GetFocusOverridesControls ( ) const [inline, virtual]

Test if the widget should intercept all key presses.

Remarks:
False by default, should be true for text entry widgets

Reimplemented from pawsWidget.

Definition at line 280 of file pawsilluminationwindow.h.

iGraphics2D* pawsSketchWindow::GetG2D ( )
void pawsSketchWindow::HandleMessage ( MsgEntry message) [virtual]

Implements psClientNetSubscriber.

virtual void pawsSketchWindow::Hide ( ) [virtual]

Makes widget invisible and removes focus if widget has current focus.

Sets visible FALSE, hides border if present and then if focused when called it calls SetCurrentFocusedWidget(NULL).

Reimplemented from pawsWidget.

bool pawsSketchWindow::isBadChar ( char  c) [protected]
bool pawsSketchWindow::IsMouseDown ( ) [inline]

Definition at line 278 of file pawsilluminationwindow.h.

void pawsSketchWindow::LoadSketch ( ) [protected]
void pawsSketchWindow::MoveObject ( int  dx,
int  dy 
) [protected]
void pawsSketchWindow::NextPrevIcon ( int  delta) [protected]
void pawsSketchWindow::OnColorEntered ( const char *  name,
int  param,
int  color 
) [virtual]

inherited from iOnColorEnteredAction

Implements iOnColorEnteredAction.

virtual bool pawsSketchWindow::OnKeyDown ( utf32_char  keyCode,
utf32_char  keyChar,
int  modifiers 
) [virtual]

Process keydown messages.

Parameters:
keyCodeThe code for the pressed key.
keyCharThe key pressed.
modifiersUsed to modify tab behavior.
Returns:
bool TRUE for success FALSE if no action.
Remarks:
If you override this, be sure to also override GetFocusOverridesControls() as returning true

Reimplemented from pawsWidget.

virtual bool pawsSketchWindow::OnMouseDown ( int  button,
int  modifiers,
int  x,
int  y 
) [virtual]

Manage mouse down event to test for and apply window changes.

Parameters:
buttonType of button: 1 resizable or movable, 2 context menu or config window.
modifiersUsed with PAWS_CONSTRUCTION.
xUsed to test for resize.
yUsed to test for resize.
Returns:
bool TRUE if movable or resizable.
Remarks:
calls OnMouseDown on it's parent.

Reimplemented from pawsWidget.

virtual bool pawsSketchWindow::OnMouseUp ( int  button,
int  modifiers,
int  x,
int  y 
) [virtual]

Manage mouse up event.

Returns:
bool Parent's result or FALSE if no parent.
Remarks:
Acts recursively on it's parents.

Reimplemented from pawsWidget.

void pawsSketchWindow::OnStringEntered ( const char *  name,
int  param,
const char *  value 
) [virtual]

inherited from iOnStringEnteredAction

Implements iOnStringEnteredAction.

bool pawsSketchWindow::ParseLimits ( const char *  xmlstr) [protected]
bool pawsSketchWindow::ParseSketch ( const char *  xml,
bool  checklimits = false 
) [protected]
bool pawsSketchWindow::PostSetup ( ) [virtual]

This is called after the widget and all of it's children have been created.

Remarks:
This can be useful for widgets that want to get pointers to some of it's children for quick access.

Reimplemented from pawsWidget.

void pawsSketchWindow::RemoveSelected ( ) [protected]
void pawsSketchWindow::SaveSketch ( ) [protected]
void pawsSketchWindow::SetToolbarButtons ( ) [protected]
csString pawsSketchWindow::toXML ( ) [protected]

Member Data Documentation

Definition at line 212 of file pawsilluminationwindow.h.

BezierWeights pawsSketchWindow::bezierWeights [protected]

Definition at line 205 of file pawsilluminationwindow.h.

Definition at line 195 of file pawsilluminationwindow.h.

Definition at line 204 of file pawsilluminationwindow.h.

Definition at line 220 of file pawsilluminationwindow.h.

uint32_t pawsSketchWindow::currentItemID [protected]

Definition at line 194 of file pawsilluminationwindow.h.

Definition at line 216 of file pawsilluminationwindow.h.

Definition at line 193 of file pawsilluminationwindow.h.

bool pawsSketchWindow::editMode [protected]

Definition at line 196 of file pawsilluminationwindow.h.

Definition at line 209 of file pawsilluminationwindow.h.

Definition at line 207 of file pawsilluminationwindow.h.

csStringArray pawsSketchWindow::iconList [protected]

Definition at line 200 of file pawsilluminationwindow.h.

Definition at line 214 of file pawsilluminationwindow.h.

Definition at line 211 of file pawsilluminationwindow.h.

Definition at line 219 of file pawsilluminationwindow.h.

bool pawsSketchWindow::mouseDown [protected]

Definition at line 197 of file pawsilluminationwindow.h.

Definition at line 198 of file pawsilluminationwindow.h.

Definition at line 199 of file pawsilluminationwindow.h.

Definition at line 217 of file pawsilluminationwindow.h.

csPDelArray<SketchObject> pawsSketchWindow::objlist [protected]

Definition at line 191 of file pawsilluminationwindow.h.

Definition at line 213 of file pawsilluminationwindow.h.

Definition at line 201 of file pawsilluminationwindow.h.

bool pawsSketchWindow::readOnly [protected]

Definition at line 202 of file pawsilluminationwindow.h.

Definition at line 215 of file pawsilluminationwindow.h.

Definition at line 218 of file pawsilluminationwindow.h.

size_t pawsSketchWindow::selectedIndex [protected]

Definition at line 192 of file pawsilluminationwindow.h.

Background image.

Definition at line 246 of file pawsilluminationwindow.h.

csString pawsSketchWindow::sketchName [protected]

Definition at line 243 of file pawsilluminationwindow.h.

Definition at line 203 of file pawsilluminationwindow.h.

Definition at line 210 of file pawsilluminationwindow.h.


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