forgotten files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
53
include/wx/generic/spinctlg.h
Normal file
53
include/wx/generic/spinctlg.h
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: wx/generic/spinctlg.h
|
||||||
|
// Purpose: generic wxSpinCtrl class
|
||||||
|
// Author: Vadim Zeitlin
|
||||||
|
// Modified by:
|
||||||
|
// Created: 28.10.99
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) Vadim Zeitlin
|
||||||
|
// Licence: wxWindows licence
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifndef _WX_GENERIC_SPINCTRL_H_
|
||||||
|
#define _WX_GENERIC_SPINCTRL_H_
|
||||||
|
|
||||||
|
#include "wx/textctrl.h"
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// generic wxSpinCtrl is just a text control
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class WXDLLEXPORT wxSpinCtrl : public wxTextCtrl
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
wxSpinCtrlBase() { Init(); }
|
||||||
|
|
||||||
|
// accessors
|
||||||
|
int GetValue() const
|
||||||
|
{
|
||||||
|
int n;
|
||||||
|
if ( (wxSscanf(wxTextCtrl::GetValue(), wxT("%d"), &n) != 1) )
|
||||||
|
n = INT_MIN;
|
||||||
|
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
|
||||||
|
int GetMin() const { return m_min; }
|
||||||
|
int GetMax() const { return m_max; }
|
||||||
|
|
||||||
|
// operations
|
||||||
|
void SetValue(const wxString& value) { wxTextCtrl::SetValue(value); }
|
||||||
|
void SetValue(int val) { wxString s; s << val; wxTextCtrl::SetValue(s); }
|
||||||
|
void SetRange(int min, int max) { m_min = min; m_max = max; }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// initialize m_min/max with the default values
|
||||||
|
void Init() { SetRange(0, 100); }
|
||||||
|
|
||||||
|
int m_min;
|
||||||
|
int m_max;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // _WX_GENERIC_SPINCTRL_H_
|
||||||
|
|
21
samples/font/Makefile.in
Normal file
21
samples/font/Makefile.in
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.unx
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1998
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1998 Julian Smart
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile for font example (UNIX).
|
||||||
|
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
top_builddir = ../..
|
||||||
|
program_dir = samples/font
|
||||||
|
|
||||||
|
PROGRAM=font
|
||||||
|
|
||||||
|
OBJECTS=$(PROGRAM).o
|
||||||
|
|
||||||
|
include ../../src/makeprog.env
|
||||||
|
|
Reference in New Issue
Block a user