bullet3/examples/ThirdPartyLibs/Gwen/Controls/ScrollControl.h
erwincoumans ab8f16961e Code-style consistency improvement:
Apply clang-format-all.sh using the _clang-format file through all the cpp/.h files.
make sure not to apply it to certain serialization structures, since some parser expects the * as part of the name, instead of type.
This commit contains no other changes aside from adding and applying clang-format-all.sh
2018-09-23 14:17:31 -07:00

68 lines
1.6 KiB
C++

/*
GWEN
Copyright (c) 2010 Facepunch Studios
See license in Gwen.h
*/
#pragma once
#ifndef GWEN_CONTROLS_SCROLLCONTROL_H
#define GWEN_CONTROLS_SCROLLCONTROL_H
#include "Gwen/Controls/Base.h"
#include "Gwen/Controls/Button.h"
#include "Gwen/Gwen.h"
#include "Gwen/Skin.h"
#include "Gwen/Controls/ScrollBar.h"
#include "Gwen/Controls/VerticalScrollBar.h"
#include "Gwen/Controls/HorizontalScrollBar.h"
namespace Gwen
{
namespace Controls
{
class GWEN_EXPORT ScrollControl : public Base
{
public:
GWEN_CONTROL(ScrollControl, Base);
virtual void Layout(Skin::Base* skin);
virtual void Render(Skin::Base* skin);
virtual void SetScroll(bool h, bool v);
virtual void SetAutoHideBars(bool should) { m_bAutoHideBars = should; }
virtual bool CanScrollH() { return m_bCanScrollH; }
virtual bool CanScrollV() { return m_bCanScrollV; }
virtual void OnChildBoundsChanged(Gwen::Rect oldChildBounds, Base* pChild);
virtual void UpdateScrollBars();
virtual void SetVScrollRequired(bool req);
virtual void SetHScrollRequired(bool req);
virtual void SetInnerSize(int w, int h);
virtual void VBarMoved(Controls::Base* control);
virtual void HBarMoved(Controls::Base* control);
virtual bool OnMouseWheeled(int iDelta);
virtual void ScrollToBottom();
virtual void ScrollToTop();
virtual void ScrollToLeft();
virtual void ScrollToRight();
virtual void Clear();
protected:
bool m_bCanScrollH;
bool m_bCanScrollV;
bool m_bAutoHideBars;
public:
Controls::BaseScrollBar* m_VerticalScrollBar;
Controls::BaseScrollBar* m_HorizontalScrollBar;
};
} // namespace Controls
} // namespace Gwen
#endif