61 extern GG_API
const WndFlag
DRAGABLE;
69 extern GG_API
const WndFlag
ONTOP;
75 extern GG_API
const WndFlag
MODAL;
220 class GG_API
Wnd :
public boost::signals::trackable
236 boost::shared_ptr<BrowseInfoWnd>
wnd;
264 ClipToClientAndWindowSeparately
275 bool Interactive()
const;
279 bool RepeatButtonDown()
const;
282 bool Dragable()
const;
285 bool Resizable()
const;
294 ChildClippingMode GetChildClippingMode()
const;
298 bool NonClientChild()
const;
301 bool Visible()
const;
305 const std::string& Name()
const;
310 const std::string& DragDropDataType()
const;
315 virtual void DropsAcceptable(DropsAcceptableIter first,
316 DropsAcceptableIter last,
321 Pt UpperLeft()
const;
326 Pt LowerRight()
const;
330 Pt RelativeUpperLeft()
const;
335 Pt RelativeLowerRight()
const;
356 virtual Pt MinUsableSize()
const;
362 virtual Pt ClientUpperLeft()
const;
368 virtual Pt ClientLowerRight()
const;
371 Pt ClientSize()
const;
373 X ClientWidth()
const;
374 Y ClientHeight()
const;
377 Pt ScreenToWindow(
const Pt& pt)
const;
380 Pt ScreenToClient(
const Pt& pt)
const;
384 virtual bool InWindow(
const Pt& pt)
const;
388 virtual bool InClient(
const Pt& pt)
const;
392 const std::list<Wnd*>& Children()
const;
398 Wnd* RootParent()
const;
401 Layout* GetLayout()
const;
404 Layout* ContainingLayout()
const;
413 const std::vector<BrowseInfoMode>& BrowseModes()
const;
418 const std::string& BrowseInfoText(std::size_t mode)
const;
422 const boost::shared_ptr<StyleFactory>& GetStyleFactory()
const;
425 virtual WndRegion WindowRegion(
const Pt& pt)
const;
432 void SetDragDropDataType(
const std::string& data_type);
439 virtual void StartingChildDragDrop(
const Wnd* wnd,
const Pt& offset);
445 virtual void AcceptDrops(
const std::vector<Wnd*>& wnds,
const Pt& pt);
455 virtual void CancellingChildDragDrop(
const std::vector<const Wnd*>& wnds);
465 virtual void ChildrenDraggedAway(
const std::vector<Wnd*>& wnds,
466 const Wnd* destination);
470 void SetName(
const std::string& name);
474 void Hide(
bool children =
true);
478 void Show(
bool children =
true);
483 virtual void ModalInit();
486 void SetChildClippingMode(ChildClippingMode mode);
490 void NonClientChild(
bool b);
492 void MoveTo(
const Pt& pt);
493 void OffsetMove(
const Pt& pt);
497 virtual void SizeMove(
const Pt& ul,
const Pt& lr);
500 void Resize(
const Pt& sz);
503 void SetMinSize(
const Pt& sz);
506 void SetMaxSize(
const Pt& sz);
510 void AttachChild(
Wnd* wnd);
514 void MoveChildUp(
Wnd* wnd);
518 void MoveChildDown(
Wnd* wnd);
521 void DetachChild(
Wnd* wnd);
524 void DetachChildren();
528 void DeleteChild(
Wnd* wnd);
531 void DeleteChildren();
534 void InstallEventFilter(
Wnd* wnd);
537 void RemoveEventFilter(
Wnd* wnd);
542 void HorizontalLayout();
547 void VerticalLayout();
556 void SetLayout(
Layout* layout);
572 void SetLayoutBorderMargin(
unsigned int margin);
576 void SetLayoutCellMargin(
unsigned int margin);
585 virtual void Render();
600 void SetBrowseModeTime(
unsigned int time, std::size_t mode = 0);
605 void SetBrowseInfoWnd(
const boost::shared_ptr<BrowseInfoWnd>& wnd, std::size_t mode = 0);
611 void ClearBrowseInfoWnd(std::size_t mode = 0);
617 void SetBrowseText(
const std::string& text, std::size_t mode = 0);
626 void SetBrowseModes(
const std::vector<BrowseInfoMode>& modes);
629 void SetStyleFactory(
const boost::shared_ptr<StyleFactory>& factory);
635 static unsigned int DefaultBrowseTime();
639 static void SetDefaultBrowseTime(
unsigned int time);
644 static const boost::shared_ptr<BrowseInfoWnd>& DefaultBrowseInfoWnd();
648 static void SetDefaultBrowseInfoWnd(
const boost::shared_ptr<BrowseInfoWnd>& browse_info_wnd);
678 DRAGGED_OVER_ACCEPTING_DROP_TARGET
693 DragDropRenderingState GetDragDropRenderingState()
const;
781 virtual void MouseLeave();
785 virtual void MouseWheel(
const Pt& pt,
int move,
Flags<ModKey> mod_keys);
790 virtual void DragDropEnter(
const Pt& pt,
const std::map<Wnd*, Pt>& drag_drop_wnds,
799 virtual void DragDropHere(
const Pt& pt,
const std::map<Wnd*, Pt>& drag_drop_wnds,
804 virtual void DragDropLeave();
814 virtual void KeyPress(
Key key, boost::uint32_t key_code_point,
Flags<ModKey> mod_keys);
821 virtual void KeyRelease(
Key key, boost::uint32_t key_code_point,
Flags<ModKey> mod_keys);
824 virtual void GainingFocus();
827 virtual void LosingFocus();
830 virtual void TimerFiring(
unsigned int ticks,
Timer* timer);
835 virtual bool EventFilter(
Wnd* w,
const WndEvent& event);
839 void HandleEvent(
const WndEvent& event);
844 void ForwardEventToParent();
847 void BeginClipping();
855 void BeginNonclientClipping();
860 void EndNonclientClipping();
867 void ValidateFlags();
870 virtual void BeginNonclientClippingImpl();
871 virtual void EndNonclientClippingImpl();
876 std::list<Wnd*> m_children;
879 std::string m_drag_drop_data_type;
881 bool m_non_client_child;
889 std::vector<Wnd*> m_filters;
891 std::set<Wnd*> m_filtering;
893 Layout* m_containing_layout;
894 std::vector<BrowseInfoMode>
897 boost::shared_ptr<StyleFactory>
906 static unsigned int s_default_browse_time;
910 static boost::shared_ptr<BrowseInfoWnd> s_default_browse_info_wnd;
913 friend class GUIImpl;