/usr/include/cegui-0.8.4/CEGUI/widgets/ScrolledContainer.h is in libcegui-mk2-dev 0.8.4+dfsg-4ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | /***********************************************************************
created: 1/3/2005
author: Paul D Turner
*************************************************************************/
/***************************************************************************
* Copyright (C) 2004 - 2009 Paul D Turner & The CEGUI Development Team
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
***************************************************************************/
#ifndef _CEGUIScrolledContainer_h_
#define _CEGUIScrolledContainer_h_
#include "../Window.h"
#include "../WindowFactory.h"
#include <map>
#if defined(_MSC_VER)
# pragma warning(push)
# pragma warning(disable : 4251)
#endif
// Start of CEGUI namespace section
namespace CEGUI
{
/*!
\brief
Helper container window class which is used in the implementation of the
ScrollablePane widget class.
*/
class CEGUIEXPORT ScrolledContainer : public Window
{
public:
//! Type name for ScrolledContainer.
static const String WidgetTypeName;
//! Namespace for global events
static const String EventNamespace;
/** Event fired whenever some child changes.
* Handlers are passed a const WindowEventArgs reference with
* WindowEventArgs::window set to the ScrolledContainer for which a child
* window has changed.
*/
static const String EventContentChanged;
/** Event fired when the autosize setting changes.
* Handlers are passed a const WindowEventArgs reference with
* WindowEventArgs::window set to the ScrolledContainer whose auto size
* setting has been changed.
*/
static const String EventAutoSizeSettingChanged;
//! Constructor for ScrolledContainer objects.
ScrolledContainer(const String& type, const String& name);
//! Destructor for ScrolledContainer objects.
~ScrolledContainer(void);
/*!
\brief
Return whether the content pane is auto sized.
\return
- true to indicate the content pane will automatically resize itself.
- false to indicate the content pane will not automatically resize
itself.
*/
bool isContentPaneAutoSized(void) const;
/*!
\brief
Set whether the content pane should be auto-sized.
\param setting
- true to indicate the content pane should automatically resize itself.
- false to indicate the content pane should not automatically resize
itself.
\return
Nothing.
*/
void setContentPaneAutoSized(bool setting);
/*!
\brief
Return the current content pane area for the ScrolledContainer.
\return
Rect object that details the current pixel extents of the content
pane represented by this ScrolledContainer.
*/
const Rectf& getContentArea(void) const;
/*!
\brief
Set the current content pane area for the ScrolledContainer.
\note
If the ScrolledContainer is configured to auto-size the content pane
this call will have no effect.
\param area
Rect object that details the pixel extents to use for the content
pane represented by this ScrolledContainer.
\return
Nothing.
*/
void setContentArea(const Rectf& area);
/*!
\brief
Return the current extents of the attached content.
\return
Rect object that describes the pixel extents of the attached
child windows. This is effectively the smallest bounding box
that could contain all the attached windows.
*/
Rectf getChildExtentsArea(void) const;
virtual const CachedRectf& getClientChildContentArea() const;
virtual const CachedRectf& getNonClientChildContentArea() const;
virtual void notifyScreenAreaChanged(bool recursive);
protected:
// Overridden from Window.
virtual Rectf getUnclippedInnerRect_impl(bool skipAllPixelAlignment) const;
Rectf getClientChildContentArea_impl(bool skipAllPixelAlignment) const;
/*!
\brief
Notification method called whenever the content size may have changed.
\param e
WindowEventArgs object.
\return
Nothing.
*/
virtual void onContentChanged(WindowEventArgs& e);
/*!
\brief
Notification method called whenever the setting that controls whether
the content pane is automatically sized is changed.
\param e
WindowEventArgs object.
\return
Nothing.
*/
virtual void onAutoSizeSettingChanged(WindowEventArgs& e);
//! handles notifications about child windows being moved.
bool handleChildSized(const EventArgs& e);
//! handles notifications about child windows being sized.
bool handleChildMoved(const EventArgs& e);
// overridden from Window.
void drawSelf(const RenderingContext&) {};
Rectf getInnerRectClipper_impl() const;
void setArea_impl(const UVector2& pos, const USize& size,
bool topLeftSizing = false, bool fireEvents = true);
Rectf getHitTestRect_impl() const;
void onChildAdded(ElementEventArgs& e);
void onChildRemoved(ElementEventArgs& e);
void onParentSized(ElementEventArgs& e);
//! type definition for collection used to track event connections.
typedef std::multimap<Window*, Event::Connection> ConnectionTracker;
//! Tracks event connections we make.
ConnectionTracker d_eventConnections;
//! Holds extents of the content pane.
Rectf d_contentArea;
//! true if the pane auto-sizes itself.
bool d_autosizePane;
CachedRectf d_clientChildContentArea;
private:
void addScrolledContainerProperties(void);
};
} // End of CEGUI namespace section
#if defined(_MSC_VER)
# pragma warning(pop)
#endif
#endif // end of guard _CEGUIScrolledContainer_h_
|