This repository has been archived on 2023-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
MyGameFramework/lib/gwen/controls/gwen_tabbutton.h
Gered c5cdddbeaa initial commit
current versions of all of my basic framework sources, build configurations/scripts, and supporting assets
2013-01-31 12:53:05 -05:00

59 lines
1.3 KiB
C++

/*
GWEN
Copyright (c) 2010 Facepunch Studios
See license in Gwen.h
*/
#pragma once
#ifndef GWEN_CONTROLS_TABBUTTON_H
#define GWEN_CONTROLS_TABBUTTON_H
#include "gwen_base.h"
#include "gwen_button.h"
namespace Gwen
{
namespace Controls
{
class TabControl;
class GWEN_EXPORT TabButton : public Button
{
public:
GWEN_CONTROL( TabButton, Button );
virtual void Render( Skin::Base* skin );
virtual void Layout( Skin::Base* skin );
void SetPage( Base* page ){ m_Page = page; }
Base* GetPage(){ return m_Page; }
void SetTabControl( TabControl* ctrl );
TabControl* GetTabControl(){ return m_Control; }
bool IsActive() { return m_Page && m_Page->Visible(); }
virtual bool DragAndDrop_ShouldStartDrag();
virtual void DragAndDrop_StartDragging( Gwen::DragAndDrop::Package* /*pPackage*/, int /*x*/, int /*y*/ ){ SetHidden( true ); }
virtual void DragAndDrop_EndDragging( bool /*bSuccess*/, int /*x*/, int /*y*/ ){ SetHidden( false ); SetDepressed( false ); }
virtual bool OnKeyLeft( bool bDown );
virtual bool OnKeyRight( bool bDown );
virtual bool OnKeyUp( bool bDown );
virtual bool OnKeyDown( bool bDown );
virtual void UpdateColours();
virtual bool ShouldClip(){ return false; }
private:
Base* m_Page;
TabControl* m_Control;
};
}
}
#endif