Gered
c5cdddbeaa
current versions of all of my basic framework sources, build configurations/scripts, and supporting assets
57 lines
1,014 B
C++
57 lines
1,014 B
C++
/*
|
|
GWEN
|
|
Copyright (c) 2010 Facepunch Studios
|
|
See license in Gwen.h
|
|
*/
|
|
|
|
#pragma once
|
|
#ifndef GWEN_CONTROLS_PROPERTY_BASEPROPERTY_H
|
|
#define GWEN_CONTROLS_PROPERTY_BASEPROPERTY_H
|
|
|
|
#include "../gwen_base.h"
|
|
#include "../../gwen.h"
|
|
#include "../../gwen_skin.h"
|
|
#include "../../gwen_utility.h"
|
|
|
|
|
|
namespace Gwen
|
|
{
|
|
namespace Controls
|
|
{
|
|
namespace Property
|
|
{
|
|
class GWEN_EXPORT Base : public Gwen::Controls::Base
|
|
{
|
|
public:
|
|
|
|
GWEN_CONTROL_INLINE( Base, Gwen::Controls::Base )
|
|
{
|
|
SetHeight( 17 );
|
|
}
|
|
|
|
virtual TextObject GetPropertyValue() = 0;
|
|
|
|
virtual void SetPropertyValue( const TextObject& v, bool bFireChangeEvents = false ) = 0;
|
|
|
|
virtual bool IsEditing() = 0;
|
|
|
|
virtual void DoChanged()
|
|
{
|
|
Event::Information info;
|
|
info.String = GetPropertyValue();
|
|
|
|
onChange.Call( this, info );
|
|
}
|
|
|
|
void OnPropertyValueChanged( Gwen::Controls::Base* /*control*/ )
|
|
{
|
|
DoChanged();
|
|
}
|
|
|
|
Event::Caller onChange;
|
|
};
|
|
}
|
|
}
|
|
}
|
|
#endif
|