Crazy Eddies GUI System: CEGUIScrolledContainer.h Source File

Crazy Eddies GUI System 0.7.6

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

CEGUIScrolledContainer.h

    00001 /***********************************************************************
    00002     filename:   CEGUIScrolledContainer.h
    00003     created:    1/3/2005
    00004     author:     Paul D Turner
    00005 *************************************************************************/
    00006 /***************************************************************************
    00007  *   Copyright (C) 2004 - 2009 Paul D Turner & The CEGUI Development Team
    00008  *
    00009  *   Permission is hereby granted, free of charge, to any person obtaining
    00010  *   a copy of this software and associated documentation files (the
    00011  *   "Software"), to deal in the Software without restriction, including
    00012  *   without limitation the rights to use, copy, modify, merge, publish,
    00013  *   distribute, sublicense, and/or sell copies of the Software, and to
    00014  *   permit persons to whom the Software is furnished to do so, subject to
    00015  *   the following conditions:
    00016  *
    00017  *   The above copyright notice and this permission notice shall be
    00018  *   included in all copies or substantial portions of the Software.
    00019  *
    00020  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    00021  *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    00022  *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    00023  *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
    00024  *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
    00025  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    00026  *   OTHER DEALINGS IN THE SOFTWARE.
    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 // Start of CEGUI namespace section
    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     // Overridden from Window.
    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     // overridden from Window.
    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 } // End of  CEGUI namespace section
    00220
    00221
    00222 #if defined(_MSC_VER)
    00223 #   pragma warning(pop)
    00224 #endif
    00225
    00226 #endif  // end of guard _CEGUIScrolledContainer_h_