MyGUI 3.4.1
MyGUI_DDContainer.h
Go to the documentation of this file.
1/*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7#ifndef MYGUI_DDCONTAINER_H_
8#define MYGUI_DDCONTAINER_H_
9
10#include "MyGUI_Prerequest.h"
11#include "MyGUI_Widget.h"
12#include "MyGUI_DDItemInfo.h"
13#include "MyGUI_EventPair.h"
14
15namespace MyGUI
16{
17
22
23
28 public Widget
29 {
31
32 public:
34
38 void setNeedDragDrop(bool _value);
40 bool getNeedDragDrop() const;
41
42 void resetDrag();
43
44 /*events:*/
52
60
68
75
83
84
85 /*internal:*/
86 // метод для установления стейта айтема
87 virtual void _setContainerItemInfo(size_t _index, bool _set, bool _accept);
88
94
102
103 protected:
104 void onMouseButtonPressed(int _left, int _top, MouseButton _id) override;
105 void onMouseButtonReleased(int _left, int _top, MouseButton _id) override;
106 void onMouseDrag(int _left, int _top, MouseButton _id) override;
107
108 virtual void notifyInvalideDrop(DDContainer* _sender);
109
110 virtual void removeDropItems();
111 virtual void updateDropItems();
112 virtual void updateDropItemsState(const DDWidgetState& _state);
113
114 void mouseDrag(MouseButton _id);
115 void mouseButtonReleased(MouseButton _id);
116 void mouseButtonPressed(MouseButton _id);
117
118 void endDrop(bool _reset);
119
120 void setPropertyOverride(const std::string& _key, const std::string& _value) override;
121
122 protected:
126
129
131
133
134 // список виджетов для дропа
137
139
140 // нужно и виджету поддержка драг энд дропа
142
144 };
145
146} // namespace MyGUI
147
148#endif // MYGUI_DDCONTAINER_H_
#define MYGUI_EXPORT
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition: MyGUI_RTTI.h:48
widget description should be here.
EventHandle_DDContainerPtrCDDItemInfoRefBoolRef eventRequestDrop
EventHandle_DDContainerPtrCDDItemInfoRefBoolRef eventStartDrag
delegates::CMultiDelegate3< DDContainer *, Widget *, const DDWidgetState & > eventUpdateDropState
EventHandle_EventHandle_DDContainerPtrWidgetPtrRefIntCoordRef requestDragWidgetInfo
DDContainer * mReseiverContainer
EventHandle_EventHandle_DDContainerPtrDDItemState eventChangeDDState
EventHandle_DDContainerPtrCDDItemInfoRefBool eventDropResult
delegates::CMultiDelegate1< DDContainer * > _eventInvalideContainer
widget description should be here.
Definition: MyGUI_Widget.h:37
delegates::CMultiDelegate2< DDContainer *, DDItemState > EventHandle_EventHandle_DDContainerPtrDDItemState
delegates::CMultiDelegate3< DDContainer *, const DDItemInfo &, bool > EventHandle_DDContainerPtrCDDItemInfoRefBool
delegates::CMultiDelegate3< DDContainer *, const DDItemInfo &, bool & > EventHandle_DDContainerPtrCDDItemInfoRefBoolRef
delegates::CDelegate3< DDContainer *, Widget *&, IntCoord & > EventHandle_EventHandle_DDContainerPtrWidgetPtrRefIntCoordRef