#include <EditWindow.h>
Public Member Functions | |
| EditWindow (void) | |
| ~EditWindow (void) | |
| void | init (UnsignedInt clientWidth, UnsignedInt clientHeight) |
| initialize the edit window singleton | |
| void | shutdown (void) |
| free all data | |
| void | draw (void) |
| draw the edit window | |
| void | updatePulse (void) |
| pulse message from timer | |
| HWND | getWindowHandle (void) |
| get window handle | |
| void | setSize (ICoord2D *size) |
| set width and height for edit window | |
| void | getSize (ICoord2D *size) |
| get width and height for edit window | |
| RGBColorReal | getBackgroundColor (void) |
| return the background color | |
| void | setBackgroundColor (RGBColorReal color) |
| set background color | |
| void | setDragMoveOrigin (ICoord2D *pos) |
| for drag moving | |
| void | setDragMoveDest (ICoord2D *pos) |
| for drag moving | |
| ICoord2D | getDragMoveOrigin (void) |
| for keybord moving | |
| ICoord2D | getDragMoveDest (void) |
| for keyboard moving | |
| void | notifyWindowDeleted (GameWindow *window) |
| window has been deleted | |
| void | mouseEvent (UnsignedInt windowsMessage, WPARAM wParam, LPARAM lParam) |
| mouse event has occurred, button up/down, move etc. | |
| void | getPopupMenuClickPos (ICoord2D *pos) |
| get popup menu click loc | |
| void | openPopupMenu (Int x, Int y) |
| open floating popup right click menu | |
| void | drawLine (Int startX, Int startY, Int endX, Int endY, Real lineWidth, UnsignedInt lineColor) |
| draw a line on the display in screen coordinates | |
| void | drawOpenRect (Int startX, Int startY, Int width, Int height, Real lineWidth, UnsignedInt lineColor) |
| draw a rect border on the display in pixel coordinates with the specified color | |
| void | drawFillRect (Int startX, Int startY, Int width, Int height, UnsignedInt color) |
| draw a filled rect on the display in pixel coords with the specified color | |
| void | drawImage (const Image *image, Int startX, Int startY, Int endX, Int endY, Color color=0xFFFFFFFF) |
| draw an image fit within the screen coordinates | |
| void | setClipRegion (IRegion2D *region) |
| image clipping support | |
| Bool | isClippingEnabled (void) |
| void | enableClipping (Bool onoff) |
Protected Member Functions | |
| void | registerEditWindowClass (void) |
| register class with OS | |
| void | drawGrid (void) |
| draw the grid | |
| void | drawSeeThruOutlines (GameWindow *windowList, Color c) |
| void | drawHiddenOutlines (GameWindow *windowList, Color c) |
| void | drawUIFeedback (void) |
| draw UI visual feedback | |
| void | handleResizeAvailable (Int mouseX, Int mouseY) |
| if mouse is close to selected window allow resize | |
| Bool | inCornerTolerance (ICoord2D *dest, ICoord2D *source, Int tolerance) |
| Bool | inLineTolerance (ICoord2D *dest, ICoord2D *lineStart, ICoord2D *lineEnd, Int tolerance) |
Static Protected Member Functions | |
| static LRESULT CALLBACK | editProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) |
| callback from windows, NOTE that it's static and has no this pointer | |
Protected Attributes | |
| ICoord2D | m_size |
| width and height of edit window | |
| UnsignedByte | m_bitDepth |
| bit depth for edit window | |
| HWND | m_editWindowHWnd |
| edit window handle | |
| Int | m_pulse |
| for visual feedback that looks cool! | |
| RGBColorReal | m_backgroundColor |
| the background color | |
| Bool | m_w3dInitialized |
| TRUE once W3D is up. | |
| WW3DAssetManager * | m_assetManager |
| asset manager for WW3D | |
| Render2DClass * | m_2DRender |
| our 2D renderer | |
| ICoord2D | m_popupMenuClickPos |
| position where popup menu was created at | |
| GameWindow * | m_pickedWindow |
| picked window from mouse click editing | |
| ICoord2D | m_dragMoveOrigin |
| mouse click position to start drag move | |
| ICoord2D | m_dragMoveDest |
| destination for drag move | |
| Bool | m_dragSelecting |
| TRUE when drawing a selection box. | |
| IRegion2D | m_selectRegion |
| region for selection box | |
| Bool | m_resizingWindow |
| TRUE when drag resizing a window. | |
| GameWindow * | m_windowToResize |
| the window to resize | |
| ICoord2D | m_resizeOrigin |
| mouse clicked down here to drag resize | |
| ICoord2D | m_resizeDest |
| mouse pos when dragging around to resize | |
| IRegion2D | m_clipRegion |
| the clipping region for images | |
| Bool | m_isClippedEnabled |
| used by 2D drawing operations to define clip re | |
Static Protected Attributes | |
| static Bool | m_classRegistered = FALSE |
| TRUE when we've register with OS. | |
| static char * | m_className = "EditWindowClass" |
| name for windows class | |
The edit window singleton definition, this is where we create and interact with GUI controls for this tool
Definition at line 73 of file EditWindow.h.
| EditWindow::EditWindow | ( | void | ) |
Definition at line 348 of file EditWindow.cpp.
| EditWindow::~EditWindow | ( | void | ) |
Definition at line 399 of file EditWindow.cpp.
| void EditWindow::draw | ( | void | ) |
| void EditWindow::drawFillRect | ( | Int | startX, |
| Int | startY, | ||
| Int | width, | ||
| Int | height, | ||
| UnsignedInt | color ) |
draw a filled rect on the display in pixel coords with the specified color
draw a filled rect on the display in pixel coords with the specified color
Definition at line 1612 of file EditWindow.cpp.
|
protected |
|
protected |
Draw an outline for a window that is hidden so we can still work with it in the editor
Definition at line 1152 of file EditWindow.cpp.
| void EditWindow::drawImage | ( | const Image * | image, |
| Int | startX, | ||
| Int | startY, | ||
| Int | endX, | ||
| Int | endY, | ||
| Color | color = 0xFFFFFFFF ) |
draw an image fit within the screen coordinates
draw an image fit within the screen coordinates
Definition at line 1631 of file EditWindow.cpp.
| void EditWindow::drawLine | ( | Int | startX, |
| Int | startY, | ||
| Int | endX, | ||
| Int | endY, | ||
| Real | lineWidth, | ||
| UnsignedInt | lineColor ) |
draw a line on the display in screen coordinates
draw a line on the display in pixel coordinates with the specified color
Definition at line 1575 of file EditWindow.cpp.
| void EditWindow::drawOpenRect | ( | Int | startX, |
| Int | startY, | ||
| Int | width, | ||
| Int | height, | ||
| Real | lineWidth, | ||
| UnsignedInt | lineColor ) |
draw a rect border on the display in pixel coordinates with the specified color
draw a rect border on the display in pixel coordinates with the specified color
Definition at line 1592 of file EditWindow.cpp.
|
protected |
Draw an outline for a window that is see thru so we can still work with it in the editor
Definition at line 1116 of file EditWindow.cpp.
|
protected |
draw UI visual feedback
Draw any visual feedback to the user about selection boxes or windows that are selected, draggin windows etc
Definition at line 1203 of file EditWindow.cpp.
|
staticprotected |
callback from windows, NOTE that it's static and has no this pointer
Window procedure for the edit window
Definition at line 90 of file EditWindow.cpp.
|
inline |
Definition at line 129 of file EditWindow.h.
| RGBColorReal EditWindow::getBackgroundColor | ( | void | ) |
return the background color
Get the background color for the edit window
Definition at line 1731 of file EditWindow.cpp.
|
inline |
for keyboard moving
Definition at line 199 of file EditWindow.h.
|
inline |
for keybord moving
Definition at line 200 of file EditWindow.h.
|
inline |
get popup menu click loc
Definition at line 196 of file EditWindow.h.
|
inline |
get width and height for edit window
Definition at line 195 of file EditWindow.h.
|
inline |
get window handle
Definition at line 194 of file EditWindow.h.
if mouse is close to selected window allow resize
Given the mouse position, if it is close enough to a corner of a SINGLE selected window then we change the icon to the appropriate resize icon. If the mouse is not moved from this position then the next left click will allow for a resize of the window
Definition at line 993 of file EditWindow.cpp.
If the 'dest' point is within 'tolerance' distance to the 'source' point this returns TRUE
Definition at line 928 of file EditWindow.cpp.
| void EditWindow::init | ( | UnsignedInt | clientWidth, |
| UnsignedInt | clientHeight ) |
initialize the edit window singleton
Initialize the edit window
< this makes text look good :)
Definition at line 410 of file EditWindow.cpp.
|
protected |
If the 'dest' point is within the region defined around the line with th specified tolerance return TRUE
Definition at line 960 of file EditWindow.cpp.
|
inline |
Definition at line 128 of file EditWindow.h.
| void EditWindow::mouseEvent | ( | UnsignedInt | windowsMessage, |
| WPARAM | wParam, | ||
| LPARAM | lParam ) |
mouse event has occurred, button up/down, move etc.
A mouse event has occurred from our window procedure
Definition at line 552 of file EditWindow.cpp.
| void EditWindow::notifyWindowDeleted | ( | GameWindow * | window | ) |
window has been deleted
A window has been deleted from the editor and the editor is now notifying the edit window about it in case anything must be cleaned up
Definition at line 1753 of file EditWindow.cpp.
open floating popup right click menu
Open the new control menu that comes up when the user right clicks in the workspace to create new controls
Definition at line 1528 of file EditWindow.cpp.
|
protected |
register class with OS
Register a class with the windows OS for an edit window
Definition at line 313 of file EditWindow.cpp.
| void EditWindow::setBackgroundColor | ( | RGBColorReal | color | ) |
set background color
Set the background color for the edit window
Definition at line 1741 of file EditWindow.cpp.
|
inline |
image clipping support
Definition at line 127 of file EditWindow.h.
|
inline |
for drag moving
Definition at line 197 of file EditWindow.h.
|
inline |
for drag moving
Definition at line 198 of file EditWindow.h.
| void EditWindow::setSize | ( | ICoord2D * | size | ) |
set width and height for edit window
The edit window should now be logically consider this size
Definition at line 1500 of file EditWindow.cpp.
| void EditWindow::shutdown | ( | void | ) |
| void EditWindow::updatePulse | ( | void | ) |
pulse message from timer
Update pulse from timer message
Definition at line 526 of file EditWindow.cpp.
|
protected |
our 2D renderer
Definition at line 170 of file EditWindow.h.
|
protected |
asset manager for WW3D
Definition at line 169 of file EditWindow.h.
|
protected |
the background color
Definition at line 166 of file EditWindow.h.
|
protected |
bit depth for edit window
Definition at line 161 of file EditWindow.h.
|
staticprotected |
TRUE when we've register with OS.
class registered flag
Definition at line 157 of file EditWindow.h.
|
protected |
the clipping region for images
Definition at line 186 of file EditWindow.h.
|
protected |
destination for drag move
Definition at line 176 of file EditWindow.h.
|
protected |
mouse click position to start drag move
Definition at line 175 of file EditWindow.h.
|
protected |
TRUE when drawing a selection box.
Definition at line 178 of file EditWindow.h.
|
protected |
edit window handle
Definition at line 162 of file EditWindow.h.
|
protected |
used by 2D drawing operations to define clip re
Definition at line 187 of file EditWindow.h.
|
protected |
picked window from mouse click editing
Definition at line 173 of file EditWindow.h.
|
protected |
position where popup menu was created at
Definition at line 172 of file EditWindow.h.
|
protected |
for visual feedback that looks cool!
Definition at line 164 of file EditWindow.h.
|
protected |
mouse pos when dragging around to resize
Definition at line 184 of file EditWindow.h.
|
protected |
mouse clicked down here to drag resize
Definition at line 183 of file EditWindow.h.
|
protected |
TRUE when drag resizing a window.
Definition at line 181 of file EditWindow.h.
|
protected |
region for selection box
Definition at line 179 of file EditWindow.h.
|
protected |
width and height of edit window
Definition at line 160 of file EditWindow.h.
|
protected |
TRUE once W3D is up.
Definition at line 168 of file EditWindow.h.
|
protected |
the window to resize
Definition at line 182 of file EditWindow.h.