#include <HierarchyView.h>
Classes | |
| struct | hashConstGameWindowPtr |
Public Member Functions | |
| HierarchyView (void) | |
| ~HierarchyView (void) | |
| void | init (void) |
| void | reset (void) |
| void | shutdown (void) |
| char * | getWindowTreeName (GameWindow *window) |
| void | addWindow (GameWindow *window, HierarchyOption option) |
| add a window to the view | |
| void | removeWindow (GameWindow *window) |
| remove window from tree | |
| void | bringWindowToTop (GameWindow *window) |
| bring window to top of parent list | |
| void | updateWindowName (GameWindow *window) |
| update tree entry based on name | |
| void | selectWindow (GameWindow *window) |
| select window | |
| HWND | getTreeHandle (void) |
| get the tree control handle | |
| HWND | getHierarchyHandle (void) |
| get window handle for the whole dialog | |
| void | setDialogPos (ICoord2D *pos) |
| void | getDialogPos (ICoord2D *pos) |
| void | setDialogSize (ICoord2D *size) |
| void | getDialogSize (ICoord2D *size) |
| void | setDragWindow (GameWindow *window) |
| void | setDragTarget (GameWindow *window) |
| GameWindow * | getDragWindow (void) |
| GameWindow * | getDragTarget (void) |
| void | moveWindowAheadOf (GameWindow *window, GameWindow *aheadOf) |
| move hierarchy representation | |
| void | moveWindowChildOf (GameWindow *window, GameWindow *parent) |
| move hierarchy representation | |
| Bool | validateDragDropOperation (GameWindow *source, GameWindow *target) |
| void | setPopupTarget (GameWindow *window) |
| set target for popup menu | |
| GameWindow * | getPopupTarget (void) |
| get the popup target window | |
| HTREEITEM | treePointToItem (Int x, Int y) |
| translate mouse pos to item location | |
| GameWindow * | getWindowFromItem (HTREEITEM treeItem) |
| get game window from user data in the tree item | |
Protected Types | |
| typedef const GameWindow * | ConstGameWindowPtr |
| typedef std::hash_map< ConstGameWindowPtr, HTREEITEM, hashConstGameWindowPtr, std::equal_to< ConstGameWindowPtr > > | TreeHash |
Protected Member Functions | |
| void | addWindowToTree (GameWindow *window, HTREEITEM treeParent, HierarchyOption option, Bool addChildren, Bool addSiblings) |
| workhorse for addWindow() | |
| HTREEITEM | findItemEntry (HTREEITEM node, GameWindow *window) |
| workhorse for findTreeEntry | |
| HTREEITEM | findTreeEntry (GameWindow *window) |
| return entry if in tree | |
Static Protected Member Functions | |
| static LRESULT CALLBACK | dialogProc (HWND hWndDialog, UINT message, WPARAM wParam, LPARAM lParam) |
Protected Attributes | |
| HWND | m_dialog |
| window handle for our control dialog | |
| HWND | m_tree |
| window handle for the tree control | |
| GameWindow * | m_dragWindow |
| for drag drop operations | |
| GameWindow * | m_dragTarget |
| target for drag and drop operations while mouse is moving | |
| GameWindow * | m_popupTarget |
| the target for right mouse popup menus | |
| TreeHash | m_treeHash |
| Speed up the search with a nice hash. | |
This view allows users to manipulate the windows hierarchy using a tree view control
Definition at line 83 of file HierarchyView.h.
|
protected |
Definition at line 144 of file HierarchyView.h.
|
protected |
Definition at line 155 of file HierarchyView.h.
| HierarchyView::HierarchyView | ( | void | ) |
Definition at line 747 of file HierarchyView.cpp.
| HierarchyView::~HierarchyView | ( | void | ) |
Definition at line 763 of file HierarchyView.cpp.
| void HierarchyView::addWindow | ( | GameWindow * | window, |
| HierarchyOption | option ) |
add a window to the view
Add a window to the hierarchy view AND any of it's children
Definition at line 906 of file HierarchyView.cpp.
|
protected |
workhorse for addWindow()
Add a single window to the hierarchy tree
Definition at line 668 of file HierarchyView.cpp.
| void HierarchyView::bringWindowToTop | ( | GameWindow * | window | ) |
bring window to top of parent list
Bring the window to the top of its parent list in the hierarchy view, if no parent is present to the top of the hierarchy then
Definition at line 977 of file HierarchyView.cpp.
|
staticprotected |
Windows dialog procedure for the control palette
Definition at line 85 of file HierarchyView.cpp.
|
protected |
workhorse for findTreeEntry
Workhorse to find the tree item anywhere in the tree with the matching data pointer of this game window
Definition at line 607 of file HierarchyView.cpp.
|
protected |
return entry if in tree
Find the game window entry in the hierarchy tree, if found the item in the tree will be returned containing the window
Definition at line 653 of file HierarchyView.cpp.
| void HierarchyView::getDialogPos | ( | ICoord2D * | pos | ) |
Get the dialog position as recorded from the static
Definition at line 1042 of file HierarchyView.cpp.
| void HierarchyView::getDialogSize | ( | ICoord2D * | size | ) |
Get the dialog size as recorded from the static
Definition at line 1056 of file HierarchyView.cpp.
|
inline |
Definition at line 171 of file HierarchyView.h.
|
inline |
Definition at line 170 of file HierarchyView.h.
|
inline |
get window handle for the whole dialog
Definition at line 167 of file HierarchyView.h.
|
inline |
get the popup target window
Definition at line 173 of file HierarchyView.h.
|
inline |
get the tree control handle
Definition at line 166 of file HierarchyView.h.
| GameWindow * HierarchyView::getWindowFromItem | ( | HTREEITEM | treeItem | ) |
get game window from user data in the tree item
Get the game window we stored as the user data lParam in the tree item
Definition at line 1243 of file HierarchyView.cpp.
| char * HierarchyView::getWindowTreeName | ( | GameWindow * | window | ) |
Given a window, return a string representation for that window in the hierarchy view
Definition at line 847 of file HierarchyView.cpp.
| void HierarchyView::init | ( | void | ) |
Create the control palette
Definition at line 774 of file HierarchyView.cpp.
| void HierarchyView::moveWindowAheadOf | ( | GameWindow * | window, |
| GameWindow * | aheadOf ) |
move hierarchy representation
Move the window hierarchy representation to be just ahead of the hierarchy entry of 'aheadOf'
Definition at line 1101 of file HierarchyView.cpp.
| void HierarchyView::moveWindowChildOf | ( | GameWindow * | window, |
| GameWindow * | parent ) |
move hierarchy representation
Move the hierarchy entry for window so that it is now the first child in the list under parent
Definition at line 1186 of file HierarchyView.cpp.
| void HierarchyView::removeWindow | ( | GameWindow * | window | ) |
remove window from tree
Remove the window from the hierarchy tree view
Definition at line 935 of file HierarchyView.cpp.
| void HierarchyView::reset | ( | void | ) |
Reset everything about our hierarchy view
Definition at line 817 of file HierarchyView.cpp.
| void HierarchyView::selectWindow | ( | GameWindow * | window | ) |
| void HierarchyView::setDialogPos | ( | ICoord2D * | pos | ) |
Definition at line 1070 of file HierarchyView.cpp.
| void HierarchyView::setDialogSize | ( | ICoord2D * | size | ) |
Definition at line 1085 of file HierarchyView.cpp.
|
inline |
Definition at line 169 of file HierarchyView.h.
|
inline |
Definition at line 168 of file HierarchyView.h.
|
inline |
set target for popup menu
Definition at line 172 of file HierarchyView.h.
| void HierarchyView::shutdown | ( | void | ) |
Destroy the control palette and all data associated with it
Definition at line 833 of file HierarchyView.cpp.
translate mouse pos to item location
Given the location (x,y) in TREE COORDINATES, correlate that to a tree item, if any
Definition at line 1226 of file HierarchyView.cpp.
| void HierarchyView::updateWindowName | ( | GameWindow * | window | ) |
update tree entry based on name
A window name may have been updated, reconstruct its hierarchy tree entry cause we like to show names when we have them
Definition at line 1010 of file HierarchyView.cpp.
| Bool HierarchyView::validateDragDropOperation | ( | GameWindow * | source, |
| GameWindow * | target ) |
Return TRUE if the drag drop operation of source onto target is logically OK. It's not OK if target is a child of source because you cannot move a parent window into it's own child list.
Definition at line 1287 of file HierarchyView.cpp.
|
protected |
window handle for our control dialog
Definition at line 136 of file HierarchyView.h.
|
protected |
target for drag and drop operations while mouse is moving
Definition at line 140 of file HierarchyView.h.
|
protected |
for drag drop operations
Definition at line 139 of file HierarchyView.h.
|
protected |
the target for right mouse popup menus
Definition at line 141 of file HierarchyView.h.
|
protected |
window handle for the tree control
Definition at line 137 of file HierarchyView.h.
|
protected |
Speed up the search with a nice hash.
Definition at line 157 of file HierarchyView.h.