MatOCAD Logo

Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

wxIFMDefaultDockingPlugin Class Reference

#include <dragndrop.h>

Inherits wxIFMExtensionPluginBase.

Inheritance diagram for wxIFMDefaultDockingPlugin:

Inheritance graph
[legend]
Collaboration diagram for wxIFMDefaultDockingPlugin:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 wxIFMDefaultDockingPlugin ()
bool Initialize (wxIFMInterfacePluginBase *plugin)

Private Member Functions

void OnLeftDown (wxIFMMouseEvent &event)
void OnLeftUp (wxIFMMouseEvent &event)
void OnMouseMove (wxIFMMouseEvent &event)
void OnKeyDown (wxIFMKeyEvent &event)
void OnDragInit (wxIFMInitDragEvent &event)
void OnDragBegin (wxIFMDragEvent &event)
void OnDragEnd (wxIFMDragEvent &event)
void OnDrag (wxIFMDragEvent &event)
void OnDock (wxIFMDockEvent &event)
void OnShowDropTargets (wxIFMShowDropTargetsEvent &event)
void DrawHintRect (wxDC &dc, const wxRect &rect)
void CreateTargetButtons ()
void DestroyTargetButtons ()
void ShowFrameDropButtons (bool show=true)
void ShowComponentDropButtons (bool show=true)
wxIFMDockTargetButtonGetDockTargetButtonByPos (const wxPoint &pos)

Private Attributes

wxIFMDefaultInterfacePluginm_ip
bool m_realtime
bool m_dragging
bool m_captured
wxPoint m_offset
wxPoint m_oldPos
wxPoint m_clickPos
int m_dragx
int m_dragy
wxRect m_hintRect
DockButtonArray m_dockButtonArray
wxIFMDockTargetButtonm_oldBtn

Detailed Description

Plugin to support drag and drop docking MSVC++8 style

Definition at line 68 of file dragndrop.h.


Constructor & Destructor Documentation

wxIFMDefaultDockingPlugin::wxIFMDefaultDockingPlugin  ) 
 

Definition at line 60 of file dragndrop.cpp.


Member Function Documentation

void wxIFMDefaultDockingPlugin::CreateTargetButtons  )  [private]
 

Definition at line 880 of file dragndrop.cpp.

References _create_helper(), wxInterfaceManager::GetInterfaceRect(), wxIFMExtensionPluginBase::GetManager(), wxInterfaceManager::GetParent(), IFM_DOCK_ICON_BOTTOM, IFM_DOCK_ICON_LEFT, IFM_DOCK_ICON_RIGHT, IFM_DOCK_ICON_TAB, IFM_DOCK_ICON_TOP, IFM_DOCK_ID_BOTTOM, IFM_DOCK_ID_FRAME_BOTTOM, IFM_DOCK_ID_FRAME_LEFT, IFM_DOCK_ID_FRAME_RIGHT, IFM_DOCK_ID_FRAME_TOP, IFM_DOCK_ID_LEFT, IFM_DOCK_ID_RIGHT, IFM_DOCK_ID_TAB, IFM_DOCK_ID_TOP, IFM_DOCK_TARGET_BUTTON_WIDTH, and m_dockButtonArray.

Referenced by OnDragBegin().

void wxIFMDefaultDockingPlugin::DestroyTargetButtons  )  [private]
 

Definition at line 938 of file dragndrop.cpp.

References m_dockButtonArray.

Referenced by OnDragEnd().

void wxIFMDefaultDockingPlugin::DrawHintRect wxDC &  dc,
const wxRect &  rect
[private]
 

Definition at line 856 of file dragndrop.cpp.

wxIFMDockTargetButton * wxIFMDefaultDockingPlugin::GetDockTargetButtonByPos const wxPoint &  pos  )  [private]
 

Parameters:
pos Position in screen coordinates
Returns:
The dock target button the position is over (if any)

Definition at line 1136 of file dragndrop.cpp.

References m_dockButtonArray.

Referenced by OnDrag().

bool wxIFMDefaultDockingPlugin::Initialize wxIFMInterfacePluginBase plugin  )  [virtual]
 

Tells the extension plugin what interface plugin it extends. If an extension plugin only works for inteface plugin Q, a warning message should be generated by this function, and false should be returned. Otherwise, return true.

If this function returns false, the extension plugin will be removed from the interface plugin that it was added to.

Reimplemented from wxIFMExtensionPluginBase.

Definition at line 73 of file dragndrop.cpp.

References img_bottom, img_bottomHover, img_left, img_leftHover, img_right, img_rightHover, img_tab, img_tabHover, img_top, img_topHover, wxIFMExtensionPluginBase::Initialize(), and m_ip.

void wxIFMDefaultDockingPlugin::OnDock wxIFMDockEvent event  )  [private]
 

Definition at line 782 of file dragndrop.cpp.

References wxIFMDockEvent::GetDestination(), wxIFMDockEvent::GetIndex(), wxIFMExtensionPluginBase::GetIP(), wxIFMDockEventEx::GetWhere(), IFM_ALIGN_HORIZONTAL, IFM_ALIGN_VERTICAL, IFM_DEFAULT_INDEX, IFM_DOCK_ID_BOTTOM, IFM_DOCK_ID_LEFT, IFM_DOCK_ID_RIGHT, IFM_DOCK_ID_TOP, wxIFMComponent::m_alignment, wxIFMComponent::m_children, wxIFMInterfacePluginBase::ProcessPluginEvent(), and wxIFMDockEventEx::SetIndex().

void wxIFMDefaultDockingPlugin::OnDrag wxIFMDragEvent event  )  [private]
 

Definition at line 702 of file dragndrop.cpp.

References wxIFMDragEvent::AltDown(), wxInterfaceManager::GetCapturedWindow(), wxIFMDefaultInterfacePlugin::GetComponentByPos(), GetDockTargetButtonByPos(), wxIFMExtensionPluginBase::GetIP(), wxIFMExtensionPluginBase::GetManager(), wxIFMDragEvent::GetPosition(), wxIFMComponent::GetType(), IFM_GET_EXTENSION_DATA, m_ip, m_offset, m_oldBtn, m_oldPos, wxIFMComponent::m_parent, wxIFMInterfacePluginBase::ProcessPluginEvent(), wxIFMDockTargetButton::SetHover(), wxIFMDragEvent::ShiftDown(), ShowComponentDropButtons(), and ShowFrameDropButtons().

void wxIFMDefaultDockingPlugin::OnDragBegin wxIFMDragEvent event  )  [private]
 

Definition at line 333 of file dragndrop.cpp.

References CreateTargetButtons(), wxInterfaceManager::DisplayStatusMessage(), wxInterfaceManager::GetCapturedWindow(), wxIFMExtensionPluginBase::GetIP(), wxIFMExtensionPluginBase::GetManager(), wxIFMDragEvent::GetPosition(), IFM_GET_EXTENSION_DATA, wxIFMComponent::m_children, wxIFMComponent::m_docked, m_offset, m_oldPos, wxIFMComponent::m_rect, wxIFMInterfacePluginBase::ProcessPluginEvent(), ShowFrameDropButtons(), and wxInterfaceManager::Update().

void wxIFMDefaultDockingPlugin::OnDragEnd wxIFMDragEvent event  )  [private]
 

Todo:
Fix this, it doesn't do quite what is expected, but at least it doesn't crash

Definition at line 419 of file dragndrop.cpp.

References DestroyTargetButtons(), wxIFMDockTargetButton::GetComponent(), wxIFMDockTargetButton::GetId(), wxIFMExtensionPluginBase::GetIP(), wxIFMExtensionPluginBase::GetManager(), wxIFMComponent::GetParentWindow(), wxIFMDragEvent::GetPosition(), wxIFMComponent::GetType(), IFM_ALIGN_HORIZONTAL, IFM_ALIGN_VERTICAL, IFM_DEFAULT_INDEX, IFM_DOCK_ID_BOTTOM, IFM_DOCK_ID_FRAME_BOTTOM, IFM_DOCK_ID_FRAME_LEFT, IFM_DOCK_ID_FRAME_RIGHT, IFM_DOCK_ID_FRAME_TOP, IFM_DOCK_ID_LEFT, IFM_DOCK_ID_RIGHT, IFM_DOCK_ID_TAB, IFM_DOCK_ID_TOP, IFM_GET_EXTENSION_DATA, IFM_ORIENTATION_BOTTOM, IFM_ORIENTATION_LEFT, IFM_ORIENTATION_RIGHT, IFM_ORIENTATION_TOP, wxIFMComponent::m_alignment, wxIFMComponent::m_children, wxIFMComponent::m_docked, m_oldBtn, wxIFMContainerData::m_orientation, wxIFMComponent::m_parent, wxIFMInterfacePluginBase::ProcessPluginEvent(), wxInterfaceManager::ResetStatusMessage(), ShowComponentDropButtons(), ShowFrameDropButtons(), wxInterfaceManager::Update(), and wxIFMDragEvent::WasCanceled().

void wxIFMDefaultDockingPlugin::OnDragInit wxIFMInitDragEvent event  )  [private]
 

Definition at line 306 of file dragndrop.cpp.

References wxInterfaceManager::CaptureInput(), wxInterfaceManager::GetCapturedWindow(), wxIFMInitDragEvent::GetDraggedComponent(), wxIFMExtensionPluginBase::GetManager(), wxIFMInitDragEvent::GetPos(), IFM_DRAG_DISTANCE, m_captured, m_clickPos, m_dragx, and m_dragy.

void wxIFMDefaultDockingPlugin::OnKeyDown wxIFMKeyEvent event  )  [private]
 

Definition at line 283 of file dragndrop.cpp.

References wxIFMExtensionPluginBase::GetIP(), wxIFMKeyEvent::GetKeyEvent(), wxIFMExtensionPluginBase::GetManager(), m_captured, m_dragging, m_realtime, wxIFMInterfacePluginBase::ProcessPluginEvent(), and wxInterfaceManager::ReleaseInput().

void wxIFMDefaultDockingPlugin::OnLeftDown wxIFMMouseEvent event  )  [private]
 

Definition at line 157 of file dragndrop.cpp.

void wxIFMDefaultDockingPlugin::OnLeftUp wxIFMMouseEvent event  )  [private]
 

Definition at line 225 of file dragndrop.cpp.

References wxIFMExtensionPluginBase::GetIP(), wxIFMExtensionPluginBase::GetManager(), wxIFMMouseEvent::GetMouseEvent(), m_captured, m_dragging, m_realtime, wxIFMInterfacePluginBase::ProcessPluginEvent(), and wxInterfaceManager::ReleaseInput().

void wxIFMDefaultDockingPlugin::OnMouseMove wxIFMMouseEvent event  )  [private]
 

Definition at line 246 of file dragndrop.cpp.

References wxInterfaceManager::GetCapturedWindow(), wxIFMExtensionPluginBase::GetIP(), wxIFMExtensionPluginBase::GetManager(), wxIFMMouseEvent::GetMouseEvent(), m_captured, m_clickPos, m_dragging, m_dragx, m_dragy, m_realtime, and wxIFMInterfacePluginBase::ProcessPluginEvent().

void wxIFMDefaultDockingPlugin::OnShowDropTargets wxIFMShowDropTargetsEvent event  )  [private]
 

Todo:
Clean this function

Definition at line 982 of file dragndrop.cpp.

References wxIFMShowDropTargetsEvent::GetDraggedComponent(), wxInterfaceManager::GetInterfaceRect(), wxIFMExtensionPluginBase::GetIP(), wxIFMExtensionPluginBase::GetManager(), wxInterfaceManager::GetParent(), wxIFMComponent::GetParentWindow(), wxIFMShowDropTargetsEvent::GetPosition(), wxIFMRectEvent::GetRect(), IFM_DOCK_TARGET_BUTTON_WIDTH, IFM_GET_EXTENSION_DATA, wxIFMComponent::IsChildOf(), wxIFMComponent::m_children, m_dockButtonArray, wxIFMComponent::m_docked, wxIFMComponent::m_parent, wxIFMInterfacePluginBase::ProcessPluginEvent(), ShowComponentDropButtons(), and ShowFrameDropButtons().

void wxIFMDefaultDockingPlugin::ShowComponentDropButtons bool  show = true  )  [private]
 

Definition at line 964 of file dragndrop.cpp.

References wxIFMExtensionPluginBase::GetManager(), wxInterfaceManager::GetParent(), and m_dockButtonArray.

Referenced by OnDrag(), OnDragEnd(), and OnShowDropTargets().

void wxIFMDefaultDockingPlugin::ShowFrameDropButtons bool  show = true  )  [private]
 

Definition at line 947 of file dragndrop.cpp.

References wxIFMExtensionPluginBase::GetManager(), wxInterfaceManager::GetParent(), and m_dockButtonArray.

Referenced by OnDrag(), OnDragBegin(), OnDragEnd(), and OnShowDropTargets().


Member Data Documentation

bool wxIFMDefaultDockingPlugin::m_captured [private]
 

Definition at line 74 of file dragndrop.h.

Referenced by OnDragInit(), OnKeyDown(), OnLeftUp(), and OnMouseMove().

wxPoint wxIFMDefaultDockingPlugin::m_clickPos [private]
 

Definition at line 75 of file dragndrop.h.

Referenced by OnDragInit(), and OnMouseMove().

DockButtonArray wxIFMDefaultDockingPlugin::m_dockButtonArray [private]
 

Definition at line 80 of file dragndrop.h.

Referenced by CreateTargetButtons(), DestroyTargetButtons(), GetDockTargetButtonByPos(), OnShowDropTargets(), ShowComponentDropButtons(), and ShowFrameDropButtons().

bool wxIFMDefaultDockingPlugin::m_dragging [private]
 

Definition at line 74 of file dragndrop.h.

Referenced by OnKeyDown(), OnLeftUp(), and OnMouseMove().

int wxIFMDefaultDockingPlugin::m_dragx [private]
 

Definition at line 76 of file dragndrop.h.

Referenced by OnDragInit(), and OnMouseMove().

int wxIFMDefaultDockingPlugin::m_dragy [private]
 

Definition at line 76 of file dragndrop.h.

Referenced by OnDragInit(), and OnMouseMove().

wxRect wxIFMDefaultDockingPlugin::m_hintRect [private]
 

Definition at line 78 of file dragndrop.h.

wxIFMDefaultInterfacePlugin* wxIFMDefaultDockingPlugin::m_ip [private]
 

Reimplemented from wxIFMExtensionPluginBase.

Definition at line 72 of file dragndrop.h.

Referenced by Initialize(), and OnDrag().

wxPoint wxIFMDefaultDockingPlugin::m_offset [private]
 

Definition at line 75 of file dragndrop.h.

Referenced by OnDrag(), and OnDragBegin().

wxIFMDockTargetButton* wxIFMDefaultDockingPlugin::m_oldBtn [private]
 

Definition at line 81 of file dragndrop.h.

Referenced by OnDrag(), and OnDragEnd().

wxPoint wxIFMDefaultDockingPlugin::m_oldPos [private]
 

Definition at line 75 of file dragndrop.h.

Referenced by OnDrag(), and OnDragBegin().

bool wxIFMDefaultDockingPlugin::m_realtime [private]
 

Definition at line 74 of file dragndrop.h.

Referenced by OnKeyDown(), OnLeftUp(), and OnMouseMove().


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

 

SourceForge Logo