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/property/gwen_baseproperty.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

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