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;
00061 static const String EventContentChanged;
00067 static const String EventAutoSizeSettingChanged;
00068
00070 ScrolledContainer(const String& type, const String& name);
00071
00073 ~ScrolledContainer(void);
00074
00084 bool isContentPaneAutoSized(void) const;
00085
00098 void setContentPaneAutoSized(bool setting);
00099
00108 const Rect& getContentArea(void) const;
00109
00125 void setContentArea(const Rect& area);
00126
00136 Rect getChildExtentsArea(void) const;
00137
00138
00139 Rect getUnclippedInnerRect_impl(void) const;
00140
00141 protected:
00153 virtual bool testClassName_impl(const String& class_name) const
00154 {
00155 if (class_name=="ScrolledContainer")
00156 return true;
00157
00158 return Window::testClassName_impl(class_name);
00159 }
00160
00171 virtual void onContentChanged(WindowEventArgs& e);
00172
00184 virtual void onAutoSizeSettingChanged(WindowEventArgs& e);
00185
00187 bool handleChildSized(const EventArgs& e);
00189 bool handleChildMoved(const EventArgs& e);
00190
00191
00192 void drawSelf(const RenderingContext&) {};
00193 Rect getInnerRectClipper_impl() const;
00194 Rect getNonClientChildWindowContentArea_impl() const;
00195 Rect getClientChildWindowContentArea_impl() const;
00196
00197 Rect getHitTestRect_impl() const;
00198 void onChildAdded(WindowEventArgs& e);
00199 void onChildRemoved(WindowEventArgs& e);
00200 void onParentSized(WindowEventArgs& e);
00201
00203 typedef std::multimap<Window*, Event::Connection> ConnectionTracker;
00205 ConnectionTracker d_eventConnections;
00207 Rect d_contentArea;
00209 bool d_autosizePane;
00210
00211 private:
00212 static ScrolledContainerProperties::ContentPaneAutoSized d_autoSizedProperty;
00213 static ScrolledContainerProperties::ContentArea d_contentAreaProperty;
00214 static ScrolledContainerProperties::ChildExtentsArea d_childExtentsAreaProperty;
00215
00216 void addScrolledContainerProperties(void);
00217 };
00218
00219 }
00220
00221
00222 #if defined(_MSC_VER)
00223 # pragma warning(pop)
00224 #endif
00225
00226 #endif // end of guard _CEGUIScrolledContainer_h_