00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _CEGUIScrolledContainer_h_
00029 #define _CEGUIScrolledContainer_h_
00030
00031 #include "../CEGUIWindow.h"
00032 #include "../CEGUIWindowFactory.h"
00033 #include "CEGUIScrolledContainerProperties.h"
00034 #include <map>
00035
00036 #if defined(_MSC_VER)
00037 # pragma warning(push)
00038 # pragma warning(disable : 4251)
00039 #endif
00040
00041
00042 namespace CEGUI
00043 {
00049 class CEGUIEXPORT ScrolledContainer : public Window
00050 {
00051 public:
00053 static const String WidgetTypeName;
00055 static const String EventNamespace;
00057 static const String EventContentChanged;
00059 static const String EventAutoSizeSettingChanged;
00060
00062 ScrolledContainer(const String& type, const String& name);
00063
00065 ~ScrolledContainer(void);
00066
00076 bool isContentPaneAutoSized(void) const;
00077
00090 void setContentPaneAutoSized(bool setting);
00091
00100 const Rect& getContentArea(void) const;
00101
00117 void setContentArea(const Rect& area);
00118
00128 Rect getChildExtentsArea(void) const;
00129
00130
00131 Rect getUnclippedInnerRect_impl(void) const;
00132
00133 protected:
00145 virtual bool testClassName_impl(const String& class_name) const
00146 {
00147 if (class_name=="ScrolledContainer")
00148 return true;
00149
00150 return Window::testClassName_impl(class_name);
00151 }
00152
00163 virtual void onContentChanged(WindowEventArgs& e);
00164
00176 virtual void onAutoSizeSettingChanged(WindowEventArgs& e);
00177
00179 bool handleChildSized(const EventArgs& e);
00181 bool handleChildMoved(const EventArgs& e);
00182
00183
00184 void drawSelf(const RenderingContext&) {};
00185 Rect getInnerRectClipper_impl() const;
00186 Rect getHitTestRect_impl() const;
00187 void onChildAdded(WindowEventArgs& e);
00188 void onChildRemoved(WindowEventArgs& e);
00189 void onParentSized(WindowEventArgs& e);
00190
00192 typedef std::multimap<Window*, Event::Connection> ConnectionTracker;
00194 ConnectionTracker d_eventConnections;
00196 Rect d_contentArea;
00198 bool d_autosizePane;
00199
00200 private:
00201 static ScrolledContainerProperties::ContentPaneAutoSized d_autoSizedProperty;
00202 static ScrolledContainerProperties::ContentArea d_contentAreaProperty;
00203 static ScrolledContainerProperties::ChildExtentsArea d_childExtentsAreaProperty;
00204
00205 void addScrolledContainerProperties(void);
00206 };
00207
00208 }
00209
00210
00211 #if defined(_MSC_VER)
00212 # pragma warning(pop)
00213 #endif
00214
00215 #endif // end of guard _CEGUIScrolledContainer_h_