#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "wx/gauge.h"
#include "../include/wxdragon.h"
extern "C" {
WXD_EXPORTED wxd_Gauge_t*
wxd_Gauge_Create(wxd_Window_t* parent, wxd_Id id, int range, int x, int y, int w, int h,
wxd_Style_t style)
{
wxWindow* wx_parent = reinterpret_cast<wxWindow*>(parent);
wxPoint pos = wxPoint(x, y);
wxSize size = wxSize(w, h);
wxGauge* gauge = new wxGauge(wx_parent, id, range, pos, size, style | wxGA_HORIZONTAL);
return reinterpret_cast<wxd_Gauge_t*>(gauge);
}
WXD_EXPORTED void
wxd_Gauge_SetRange(wxd_Gauge_t* self, int range)
{
wxGauge* gauge = reinterpret_cast<wxGauge*>(self);
if (!gauge)
return;
gauge->SetRange(range);
}
WXD_EXPORTED void
wxd_Gauge_SetValue(wxd_Gauge_t* self, int value)
{
wxGauge* gauge = reinterpret_cast<wxGauge*>(self);
if (!gauge)
return;
gauge->SetValue(value);
}
WXD_EXPORTED int
wxd_Gauge_GetValue(const wxd_Gauge_t* self)
{
const wxGauge* gauge = reinterpret_cast<const wxGauge*>(self);
if (!gauge)
return 0; return gauge->GetValue();
}
}