Added wxLEDNumberCtrl to gizmos and wxPython
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
89
contrib/include/wx/gizmos/ledctrl.h
Normal file
89
contrib/include/wx/gizmos/ledctrl.h
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
#ifndef _WX_LEDNUMBERCTRL_H_
|
||||||
|
#define _WX_LEDNUMBERCTRL_H_
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
#pragma interface "wxLEDNumberCtrl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef GIZMOISDLL
|
||||||
|
#define GIZMODLLEXPORT WXDLLEXPORT
|
||||||
|
#else
|
||||||
|
#define GIZMODLLEXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#include <wx/window.h>
|
||||||
|
#include <wx/control.h>
|
||||||
|
|
||||||
|
class wxEraseEvent;
|
||||||
|
class wxPaintEvent;
|
||||||
|
class wxSizeEvent;
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// enum and styles
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
enum wxLEDValueAlign
|
||||||
|
{
|
||||||
|
wxLED_ALIGN_LEFT = 0x01,
|
||||||
|
wxLED_ALIGN_RIGHT = 0x02,
|
||||||
|
wxLED_ALIGN_CENTER = 0x04,
|
||||||
|
|
||||||
|
wxLED_ALIGN_MASK = 0x04
|
||||||
|
};
|
||||||
|
|
||||||
|
#define wxLED_DRAW_FADED 0x08
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// wxLEDNumberCtrl
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class GIZMODLLEXPORT wxLEDNumberCtrl : public wxControl
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// Constructors.
|
||||||
|
wxLEDNumberCtrl();
|
||||||
|
wxLEDNumberCtrl(wxWindow *parent, wxWindowID id = -1,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxLED_ALIGN_LEFT | wxLED_DRAW_FADED);
|
||||||
|
|
||||||
|
// Create functions.
|
||||||
|
bool Create(wxWindow *parent, wxWindowID id = -1,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = 0);
|
||||||
|
|
||||||
|
wxLEDValueAlign GetAlignment() const { return m_Alignment; }
|
||||||
|
bool GetDrawFaded() const { return m_DrawFaded; }
|
||||||
|
const wxString &GetValue() const { return m_Value; }
|
||||||
|
|
||||||
|
void SetAlignment(wxLEDValueAlign Alignment, bool Redraw = TRUE);
|
||||||
|
void SetDrawFaded(bool DrawFaded, bool Redraw = TRUE);
|
||||||
|
void SetValue(const wxString &Value, bool Redraw = TRUE);
|
||||||
|
|
||||||
|
private:
|
||||||
|
// Members.
|
||||||
|
wxString m_Value;
|
||||||
|
wxLEDValueAlign m_Alignment;
|
||||||
|
|
||||||
|
int m_LineMargin;
|
||||||
|
int m_DigitMargin;
|
||||||
|
int m_LineLength;
|
||||||
|
int m_LineWidth;
|
||||||
|
bool m_DrawFaded;
|
||||||
|
int m_LeftStartPos;
|
||||||
|
|
||||||
|
// Functions.
|
||||||
|
void DrawDigit(wxDC &Dc, int Digit, int Column);
|
||||||
|
void RecalcInternals(const wxSize &CurrentSize);
|
||||||
|
|
||||||
|
// Events.
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
|
||||||
|
void OnEraseBackground(wxEraseEvent &Event);
|
||||||
|
void OnPaint(wxPaintEvent &Event);
|
||||||
|
void OnSize(wxSizeEvent &Event);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@@ -118,5 +118,9 @@ SOURCE=.\multicell.cpp
|
|||||||
|
|
||||||
SOURCE=.\splittree.cpp
|
SOURCE=.\splittree.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ledctrl.cpp
|
||||||
|
# End Source File
|
||||||
# End Target
|
# End Target
|
||||||
# End Project
|
# End Project
|
||||||
|
@@ -13,9 +13,9 @@ LIBVERSION_AGE=0
|
|||||||
HEADER_PATH=$(top_srcdir)/contrib/include/wx
|
HEADER_PATH=$(top_srcdir)/contrib/include/wx
|
||||||
HEADER_SUBDIR=gizmos
|
HEADER_SUBDIR=gizmos
|
||||||
|
|
||||||
HEADERS=multicell.h splittree.h editlbox.h dynamicsash.h
|
HEADERS=multicell.h splittree.h editlbox.h dynamicsash.h ledctrl.h
|
||||||
|
|
||||||
OBJECTS=multicell.o splittree.o editlbox.o dynamicsash.o
|
OBJECTS=multicell.o splittree.o editlbox.o dynamicsash.o ledctrl.o
|
||||||
DEPFILES=$(OBJECTS:.o=.d)
|
DEPFILES=$(OBJECTS:.o=.d)
|
||||||
|
|
||||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||||
|
358
contrib/src/gizmos/ledctrl.cpp
Normal file
358
contrib/src/gizmos/ledctrl.cpp
Normal file
@@ -0,0 +1,358 @@
|
|||||||
|
// ============================================================================
|
||||||
|
// headers
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
#pragma implementation "wxLEDNumberCtrl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif //__BORLANDC__
|
||||||
|
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#include "wx/dcclient.h"
|
||||||
|
#include "wx/dcmemory.h"
|
||||||
|
#include "wx/intl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "wx/gizmos/ledctrl.h"
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// constants
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// A LED digit is build up like this, with maximum 7 Lines :
|
||||||
|
//
|
||||||
|
// 111
|
||||||
|
// 6 2
|
||||||
|
// 777
|
||||||
|
// 5 3
|
||||||
|
// 444
|
||||||
|
//
|
||||||
|
// Each number contains combinations of the lines, and they are set up below.
|
||||||
|
|
||||||
|
const int LINE1 = 1;
|
||||||
|
const int LINE2 = 2;
|
||||||
|
const int LINE3 = 4;
|
||||||
|
const int LINE4 = 8;
|
||||||
|
const int LINE5 = 16;
|
||||||
|
const int LINE6 = 32;
|
||||||
|
const int LINE7 = 64;
|
||||||
|
|
||||||
|
const int DIGIT0 = LINE1 | LINE2 | LINE3 | LINE4 | LINE5 | LINE6;
|
||||||
|
const int DIGIT1 = LINE2 | LINE3;
|
||||||
|
const int DIGIT2 = LINE1 | LINE2 | LINE4 | LINE5 | LINE7;
|
||||||
|
const int DIGIT3 = LINE1 | LINE2 | LINE3 | LINE4 | LINE7;
|
||||||
|
const int DIGIT4 = LINE2 | LINE3 | LINE6 | LINE7;
|
||||||
|
const int DIGIT5 = LINE1 | LINE3 | LINE4 | LINE6 | LINE7;
|
||||||
|
const int DIGIT6 = LINE1 | LINE3 | LINE4 | LINE5 | LINE6 | LINE7;
|
||||||
|
const int DIGIT7 = LINE1 | LINE2 | LINE3;
|
||||||
|
const int DIGIT8 = LINE1 | LINE2 | LINE3 | LINE4 | LINE5 | LINE6 | LINE7;
|
||||||
|
const int DIGIT9 = LINE1 | LINE2 | LINE3 | LINE6 | LINE7;
|
||||||
|
const int DASH = LINE7;
|
||||||
|
|
||||||
|
const int DIGITALL = -1;
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// wxLEDNumberCtrl class implementation
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
wxLEDNumberCtrl::wxLEDNumberCtrl()
|
||||||
|
: m_Alignment(wxLED_ALIGN_LEFT),
|
||||||
|
m_LineMargin(-1),
|
||||||
|
m_DigitMargin(-1),
|
||||||
|
m_LineLength(-1),
|
||||||
|
m_LineWidth(-1),
|
||||||
|
m_DrawFaded(FALSE),
|
||||||
|
m_LeftStartPos(-1)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
wxLEDNumberCtrl::wxLEDNumberCtrl(wxWindow *parent, wxWindowID id,
|
||||||
|
const wxPoint& pos, const wxSize& size,
|
||||||
|
long style)
|
||||||
|
: m_Alignment(wxLED_ALIGN_LEFT),
|
||||||
|
m_LineMargin(-1),
|
||||||
|
m_DigitMargin(-1),
|
||||||
|
m_LineLength(-1),
|
||||||
|
m_LineWidth(-1),
|
||||||
|
m_DrawFaded(FALSE),
|
||||||
|
m_LeftStartPos(-1)
|
||||||
|
{
|
||||||
|
Create(parent, id, pos, size, style);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool wxLEDNumberCtrl::Create(wxWindow *parent, wxWindowID id,
|
||||||
|
const wxPoint& pos, const wxSize& size,
|
||||||
|
long style)
|
||||||
|
{
|
||||||
|
bool RetVal = wxControl::Create(parent, id, pos, size, style);
|
||||||
|
|
||||||
|
if ((style & wxLED_DRAW_FADED) != 0)
|
||||||
|
SetDrawFaded(TRUE);
|
||||||
|
if ((style & wxLED_ALIGN_MASK) != 0)
|
||||||
|
SetAlignment((wxLEDValueAlign)(style & wxLED_ALIGN_MASK));
|
||||||
|
|
||||||
|
SetBackgroundColour(*wxBLACK);
|
||||||
|
SetForegroundColour(*wxGREEN);
|
||||||
|
|
||||||
|
return RetVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wxLEDNumberCtrl::SetAlignment(wxLEDValueAlign Alignment, bool Redraw)
|
||||||
|
{
|
||||||
|
if (Alignment != m_Alignment)
|
||||||
|
{
|
||||||
|
m_Alignment = Alignment;
|
||||||
|
RecalcInternals(GetClientSize());
|
||||||
|
|
||||||
|
if (Redraw)
|
||||||
|
Refresh(FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wxLEDNumberCtrl::SetDrawFaded(bool DrawFaded, bool Redraw)
|
||||||
|
{
|
||||||
|
if (DrawFaded != m_DrawFaded)
|
||||||
|
{
|
||||||
|
m_DrawFaded = DrawFaded;
|
||||||
|
|
||||||
|
if (Redraw)
|
||||||
|
Refresh(FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wxLEDNumberCtrl::SetValue(wxString const &Value, bool Redraw)
|
||||||
|
{
|
||||||
|
if (Value != m_Value)
|
||||||
|
{
|
||||||
|
if (!Value.IsEmpty())
|
||||||
|
{
|
||||||
|
for(size_t i=0; i<Value.Length(); i++) {
|
||||||
|
wxChar ch = Value[i];
|
||||||
|
wxASSERT_MSG((ch>='0' && ch<='9') || ch=='-' || ch==' ',
|
||||||
|
wxT("wxLEDNumberCtrl can only display numeric string values."));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
m_Value = Value;
|
||||||
|
RecalcInternals(GetClientSize());
|
||||||
|
|
||||||
|
if (Redraw)
|
||||||
|
Refresh(FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(wxLEDNumberCtrl, wxControl)
|
||||||
|
EVT_ERASE_BACKGROUND(wxLEDNumberCtrl::OnEraseBackground)
|
||||||
|
EVT_PAINT(wxLEDNumberCtrl::OnPaint)
|
||||||
|
EVT_SIZE(wxLEDNumberCtrl::OnSize)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
|
void wxLEDNumberCtrl::OnEraseBackground(wxEraseEvent &Event)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wxLEDNumberCtrl::OnPaint(wxPaintEvent &Event)
|
||||||
|
{
|
||||||
|
wxPaintDC Dc(this);
|
||||||
|
|
||||||
|
int Width, Height;
|
||||||
|
GetClientSize(&Width, &Height);
|
||||||
|
|
||||||
|
wxBitmap *pMemoryBitmap = new wxBitmap(Width, Height);
|
||||||
|
wxMemoryDC MemDc;
|
||||||
|
|
||||||
|
MemDc.SelectObject(*pMemoryBitmap);
|
||||||
|
MemDc.BeginDrawing();
|
||||||
|
|
||||||
|
// Draw background.
|
||||||
|
MemDc.SetBrush(wxBrush(GetBackgroundColour(), wxSOLID));
|
||||||
|
MemDc.DrawRectangle(wxRect(0, 0, Width, Height));
|
||||||
|
MemDc.SetBrush(wxNullBrush);
|
||||||
|
|
||||||
|
// Iterate each digit in the value, and draw.
|
||||||
|
const int DigitCount = m_Value.Len();
|
||||||
|
for (int i = 0; i < DigitCount; ++i)
|
||||||
|
{
|
||||||
|
// Draw faded lines if wanted.
|
||||||
|
if (m_DrawFaded)
|
||||||
|
DrawDigit(MemDc, DIGITALL, i);
|
||||||
|
|
||||||
|
// Draw the digits.
|
||||||
|
switch (m_Value[i])
|
||||||
|
{
|
||||||
|
case '0' :
|
||||||
|
DrawDigit(MemDc, DIGIT0, i);
|
||||||
|
break;
|
||||||
|
case '1' :
|
||||||
|
DrawDigit(MemDc, DIGIT1, i);
|
||||||
|
break;
|
||||||
|
case '2' :
|
||||||
|
DrawDigit(MemDc, DIGIT2, i);
|
||||||
|
break;
|
||||||
|
case '3' :
|
||||||
|
DrawDigit(MemDc, DIGIT3, i);
|
||||||
|
break;
|
||||||
|
case '4' :
|
||||||
|
DrawDigit(MemDc, DIGIT4, i);
|
||||||
|
break;
|
||||||
|
case '5' :
|
||||||
|
DrawDigit(MemDc, DIGIT5, i);
|
||||||
|
break;
|
||||||
|
case '6' :
|
||||||
|
DrawDigit(MemDc, DIGIT6, i);
|
||||||
|
break;
|
||||||
|
case '7' :
|
||||||
|
DrawDigit(MemDc, DIGIT7, i);
|
||||||
|
break;
|
||||||
|
case '8' :
|
||||||
|
DrawDigit(MemDc, DIGIT8, i);
|
||||||
|
break;
|
||||||
|
case '9' :
|
||||||
|
DrawDigit(MemDc, DIGIT9, i);
|
||||||
|
break;
|
||||||
|
case '-' :
|
||||||
|
DrawDigit(MemDc, DASH, i);
|
||||||
|
break;
|
||||||
|
case ' ' :
|
||||||
|
// just skip it
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
wxFAIL_MSG(_("Unknown digit value"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MemDc.EndDrawing();
|
||||||
|
|
||||||
|
// Blit the memory dc to screen.
|
||||||
|
Dc.Blit(0, 0, Width, Height, &MemDc, 0, 0, wxCOPY);
|
||||||
|
delete pMemoryBitmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wxLEDNumberCtrl::DrawDigit(wxDC &Dc, int Digit, int Column)
|
||||||
|
{
|
||||||
|
wxColour LineColor(GetForegroundColour());
|
||||||
|
|
||||||
|
if (Digit == DIGITALL)
|
||||||
|
{
|
||||||
|
const int R = LineColor.Red() / 3;
|
||||||
|
const int G = LineColor.Green() / 3;
|
||||||
|
const int B = LineColor.Blue() / 3;
|
||||||
|
|
||||||
|
LineColor.Set(R, G, B);
|
||||||
|
}
|
||||||
|
|
||||||
|
int XPos = m_LeftStartPos;
|
||||||
|
|
||||||
|
if (Column > 0)
|
||||||
|
XPos += (Column * m_LineLength) + (m_DigitMargin) * Column;
|
||||||
|
|
||||||
|
// Create a pen and draw the lines.
|
||||||
|
wxPen Pen(LineColor, m_LineWidth, wxSOLID);
|
||||||
|
Dc.SetPen(Pen);
|
||||||
|
|
||||||
|
if ((Digit & LINE1))
|
||||||
|
{
|
||||||
|
Dc.DrawLine(XPos + m_LineMargin*2, m_LineMargin,
|
||||||
|
XPos + m_LineLength, m_LineMargin);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Digit & LINE2)
|
||||||
|
{
|
||||||
|
Dc.DrawLine(XPos + m_LineLength + m_LineMargin, m_LineMargin*2,
|
||||||
|
XPos + m_LineLength + m_LineMargin, m_LineLength + (m_LineMargin*2));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Digit & LINE3)
|
||||||
|
{
|
||||||
|
Dc.DrawLine(XPos + m_LineLength + m_LineMargin, m_LineLength + (m_LineMargin*4),
|
||||||
|
XPos + m_LineLength + m_LineMargin, m_LineLength*2 + (m_LineMargin*3));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Digit & LINE4)
|
||||||
|
{
|
||||||
|
Dc.DrawLine(XPos + m_LineMargin*2, m_LineLength*2 + (m_LineMargin*4),
|
||||||
|
XPos + m_LineLength, m_LineLength*2 + (m_LineMargin*4));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Digit & LINE5)
|
||||||
|
{
|
||||||
|
Dc.DrawLine(XPos + m_LineMargin, m_LineLength + (m_LineMargin*4),
|
||||||
|
XPos + m_LineMargin, m_LineLength*2 + (m_LineMargin*3));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Digit & LINE6)
|
||||||
|
{
|
||||||
|
Dc.DrawLine(XPos + m_LineMargin, m_LineMargin*2,
|
||||||
|
XPos + m_LineMargin, m_LineLength + (m_LineMargin*2));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Digit & LINE7)
|
||||||
|
{
|
||||||
|
Dc.DrawLine(XPos + m_LineMargin*2, m_LineLength + (m_LineMargin*3),
|
||||||
|
XPos + m_LineMargin + m_LineLength - m_LineMargin, m_LineLength + (m_LineMargin*3));
|
||||||
|
}
|
||||||
|
|
||||||
|
Dc.SetPen(wxNullPen);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wxLEDNumberCtrl::RecalcInternals(const wxSize &CurrentSize)
|
||||||
|
{
|
||||||
|
const int Height = CurrentSize.GetHeight();
|
||||||
|
|
||||||
|
if ((Height * 0.07) < 1)
|
||||||
|
m_LineMargin = 1;
|
||||||
|
else
|
||||||
|
m_LineMargin = Height * 0.07;
|
||||||
|
|
||||||
|
if ((Height * 0.35) < 1)
|
||||||
|
m_LineLength = 1;
|
||||||
|
else
|
||||||
|
m_LineLength = Height * 0.35;
|
||||||
|
|
||||||
|
m_LineWidth = m_LineMargin;
|
||||||
|
|
||||||
|
m_DigitMargin = m_LineMargin * 4;
|
||||||
|
|
||||||
|
const int ValueWidth = (m_LineLength + m_DigitMargin) * m_Value.Len();
|
||||||
|
const int ClientWidth = CurrentSize.GetWidth();
|
||||||
|
|
||||||
|
switch (m_Alignment)
|
||||||
|
{
|
||||||
|
case wxLED_ALIGN_LEFT :
|
||||||
|
m_LeftStartPos = 0;
|
||||||
|
break;
|
||||||
|
case wxLED_ALIGN_RIGHT :
|
||||||
|
m_LeftStartPos = ClientWidth - ValueWidth;
|
||||||
|
break;
|
||||||
|
case wxLED_ALIGN_CENTER :
|
||||||
|
m_LeftStartPos = (ClientWidth - ValueWidth) / 2;
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
wxFAIL_MSG(_("Unknown alignent value for wxLEDNumberCtrl."));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wxLEDNumberCtrl::OnSize(wxSizeEvent &Event)
|
||||||
|
{
|
||||||
|
RecalcInternals(Event.GetSize());
|
||||||
|
|
||||||
|
Event.Skip();
|
||||||
|
}
|
@@ -11,7 +11,7 @@ WXDIR = $(WXWIN)
|
|||||||
|
|
||||||
LIBTARGET=$(WXDIR)\lib\gizmos.lib
|
LIBTARGET=$(WXDIR)\lib\gizmos.lib
|
||||||
|
|
||||||
OBJECTS = multicell.obj splittree.obj editlbox.obj dynamicsash.obj
|
OBJECTS = multicell.obj splittree.obj editlbox.obj dynamicsash.obj ledctrl.obj
|
||||||
|
|
||||||
!include $(WXDIR)\src\makelib.b32
|
!include $(WXDIR)\src\makelib.b32
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@ WXDIR = $(WXWIN)
|
|||||||
|
|
||||||
LIBTARGET=$(WXDIR)\lib\gizmos.lib
|
LIBTARGET=$(WXDIR)\lib\gizmos.lib
|
||||||
|
|
||||||
OBJECTS = multicell.obj splittree.obj editlbox.obj dynamicsash.obj
|
OBJECTS = multicell.obj splittree.obj editlbox.obj dynamicsash.obj ledctrl.obj
|
||||||
|
|
||||||
!include $(WXDIR)\src\makelib.bcc
|
!include $(WXDIR)\src\makelib.bcc
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
WXDIR = ../../..
|
WXDIR = ../../..
|
||||||
|
|
||||||
LIBTARGET=$(WXDIR)/lib/libgizmos.a
|
LIBTARGET=$(WXDIR)/lib/libgizmos.a
|
||||||
OBJECTS = multicell.o splittree.o editlbox.o dynamicsash.o
|
OBJECTS = multicell.o splittree.o editlbox.o dynamicsash.o ledctrl.o
|
||||||
|
|
||||||
include $(WXDIR)/src/makelib.g95
|
include $(WXDIR)/src/makelib.g95
|
||||||
|
|
||||||
|
@@ -23,7 +23,7 @@ LOCALDOCDIR=$(WXDIR)\contrib\docs\latex\gizmos
|
|||||||
|
|
||||||
!include $(WXDIR)\src\makevc.env
|
!include $(WXDIR)\src\makevc.env
|
||||||
|
|
||||||
OBJECTS = $(D)\multicell.obj $(D)\splittree.obj $(D)\editlbox.obj $(D)\dynamicsash.obj
|
OBJECTS = $(D)\multicell.obj $(D)\splittree.obj $(D)\editlbox.obj $(D)\dynamicsash.obj $(D)\ledctrl.obj
|
||||||
|
|
||||||
LIBTARGET=$(WXDIR)\lib\gizmos$(LIBEXT).lib
|
LIBTARGET=$(WXDIR)\lib\gizmos$(LIBEXT).lib
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@ THISDIR = $(WXDIR)\contrib\src\gizmos
|
|||||||
NAME = gizmos
|
NAME = gizmos
|
||||||
LNK = $(name).lnk
|
LNK = $(name).lnk
|
||||||
|
|
||||||
OBJECTS = multicell.obj splittree.obj editlbox.obj dynamicsash.obj
|
OBJECTS = multicell.obj splittree.obj editlbox.obj dynamicsash.obj ledctrl.obj
|
||||||
|
|
||||||
all: $(GIZMOSLIB)
|
all: $(GIZMOSLIB)
|
||||||
|
|
||||||
|
@@ -59,6 +59,7 @@ extern PyObject *SWIG_newvarlink(void);
|
|||||||
#include <wx/gizmos/dynamicsash.h>
|
#include <wx/gizmos/dynamicsash.h>
|
||||||
#include <wx/gizmos/editlbox.h>
|
#include <wx/gizmos/editlbox.h>
|
||||||
#include <wx/gizmos/splittree.h>
|
#include <wx/gizmos/splittree.h>
|
||||||
|
#include <wx/gizmos/ledctrl.h>
|
||||||
|
|
||||||
|
|
||||||
static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||||
@@ -1320,7 +1321,385 @@ static PyObject *_wrap_new_wxSplitterScrolledWindow(PyObject *self, PyObject *ar
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void *SwigwxLEDNumberCtrlTowxControl(void *ptr) {
|
||||||
|
wxLEDNumberCtrl *src;
|
||||||
|
wxControl *dest;
|
||||||
|
src = (wxLEDNumberCtrl *) ptr;
|
||||||
|
dest = (wxControl *) src;
|
||||||
|
return (void *) dest;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void *SwigwxLEDNumberCtrlTowxWindow(void *ptr) {
|
||||||
|
wxLEDNumberCtrl *src;
|
||||||
|
wxWindow *dest;
|
||||||
|
src = (wxLEDNumberCtrl *) ptr;
|
||||||
|
dest = (wxWindow *) src;
|
||||||
|
return (void *) dest;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void *SwigwxLEDNumberCtrlTowxEvtHandler(void *ptr) {
|
||||||
|
wxLEDNumberCtrl *src;
|
||||||
|
wxEvtHandler *dest;
|
||||||
|
src = (wxLEDNumberCtrl *) ptr;
|
||||||
|
dest = (wxEvtHandler *) src;
|
||||||
|
return (void *) dest;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void *SwigwxLEDNumberCtrlTowxObject(void *ptr) {
|
||||||
|
wxLEDNumberCtrl *src;
|
||||||
|
wxObject *dest;
|
||||||
|
src = (wxLEDNumberCtrl *) ptr;
|
||||||
|
dest = (wxObject *) src;
|
||||||
|
return (void *) dest;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define new_wxLEDNumberCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxLEDNumberCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4))
|
||||||
|
static PyObject *_wrap_new_wxLEDNumberCtrl(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxLEDNumberCtrl * _result;
|
||||||
|
wxWindow * _arg0;
|
||||||
|
wxWindowID _arg1 = (wxWindowID ) -1;
|
||||||
|
wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
|
||||||
|
wxSize * _arg3 = (wxSize *) &wxDefaultSize;
|
||||||
|
long _arg4 = (long ) (wxLED_ALIGN_LEFT)|(wxLED_DRAW_FADED);
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
wxPoint temp;
|
||||||
|
PyObject * _obj2 = 0;
|
||||||
|
wxSize temp0;
|
||||||
|
PyObject * _obj3 = 0;
|
||||||
|
char *_kwnames[] = { "parent","id","pos","size","style", NULL };
|
||||||
|
char _ptemp[128];
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOl:new_wxLEDNumberCtrl",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxLEDNumberCtrl. Expected _wxWindow_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (_obj2)
|
||||||
|
{
|
||||||
|
_arg2 = &temp;
|
||||||
|
if (! wxPoint_helper(_obj2, &_arg2))
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
if (_obj3)
|
||||||
|
{
|
||||||
|
_arg3 = &temp0;
|
||||||
|
if (! wxSize_helper(_obj3, &_arg3))
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = (wxLEDNumberCtrl *)new_wxLEDNumberCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} if (_result) {
|
||||||
|
SWIG_MakePtr(_ptemp, (char *) _result,"_wxLEDNumberCtrl_p");
|
||||||
|
_resultobj = Py_BuildValue("s",_ptemp);
|
||||||
|
} else {
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
}
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define new_wxPreLEDNumberCtrl() (new wxLEDNumberCtrl())
|
||||||
|
static PyObject *_wrap_new_wxPreLEDNumberCtrl(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxLEDNumberCtrl * _result;
|
||||||
|
char *_kwnames[] = { NULL };
|
||||||
|
char _ptemp[128];
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreLEDNumberCtrl",_kwnames))
|
||||||
|
return NULL;
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = (wxLEDNumberCtrl *)new_wxPreLEDNumberCtrl();
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} if (_result) {
|
||||||
|
SWIG_MakePtr(_ptemp, (char *) _result,"_wxLEDNumberCtrl_p");
|
||||||
|
_resultobj = Py_BuildValue("s",_ptemp);
|
||||||
|
} else {
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
}
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxLEDNumberCtrl_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4))
|
||||||
|
static PyObject *_wrap_wxLEDNumberCtrl_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
bool _result;
|
||||||
|
wxLEDNumberCtrl * _arg0;
|
||||||
|
wxWindow * _arg1;
|
||||||
|
wxWindowID _arg2 = (wxWindowID ) -1;
|
||||||
|
wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
|
||||||
|
wxSize * _arg4 = (wxSize *) &wxDefaultSize;
|
||||||
|
long _arg5 = (long ) (wxLED_ALIGN_LEFT)|(wxLED_DRAW_FADED);
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
PyObject * _argo1 = 0;
|
||||||
|
wxPoint temp;
|
||||||
|
PyObject * _obj3 = 0;
|
||||||
|
wxSize temp0;
|
||||||
|
PyObject * _obj4 = 0;
|
||||||
|
char *_kwnames[] = { "self","parent","id","pos","size","style", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOOl:wxLEDNumberCtrl_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLEDNumberCtrl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLEDNumberCtrl_Create. Expected _wxLEDNumberCtrl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (_argo1) {
|
||||||
|
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxLEDNumberCtrl_Create. Expected _wxWindow_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (_obj3)
|
||||||
|
{
|
||||||
|
_arg3 = &temp;
|
||||||
|
if (! wxPoint_helper(_obj3, &_arg3))
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
if (_obj4)
|
||||||
|
{
|
||||||
|
_arg4 = &temp0;
|
||||||
|
if (! wxSize_helper(_obj4, &_arg4))
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = (bool )wxLEDNumberCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxLEDNumberCtrl_GetAlignment(_swigobj) (_swigobj->GetAlignment())
|
||||||
|
static PyObject *_wrap_wxLEDNumberCtrl_GetAlignment(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxLEDValueAlign _result;
|
||||||
|
wxLEDNumberCtrl * _arg0;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLEDNumberCtrl_GetAlignment",_kwnames,&_argo0))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLEDNumberCtrl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLEDNumberCtrl_GetAlignment. Expected _wxLEDNumberCtrl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = (wxLEDValueAlign )wxLEDNumberCtrl_GetAlignment(_arg0);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxLEDNumberCtrl_GetDrawFaded(_swigobj) (_swigobj->GetDrawFaded())
|
||||||
|
static PyObject *_wrap_wxLEDNumberCtrl_GetDrawFaded(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
bool _result;
|
||||||
|
wxLEDNumberCtrl * _arg0;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLEDNumberCtrl_GetDrawFaded",_kwnames,&_argo0))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLEDNumberCtrl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLEDNumberCtrl_GetDrawFaded. Expected _wxLEDNumberCtrl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = (bool )wxLEDNumberCtrl_GetDrawFaded(_arg0);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxLEDNumberCtrl_GetValue(_swigobj) (_swigobj->GetValue())
|
||||||
|
static PyObject *_wrap_wxLEDNumberCtrl_GetValue(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxString * _result;
|
||||||
|
wxLEDNumberCtrl * _arg0;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLEDNumberCtrl_GetValue",_kwnames,&_argo0))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLEDNumberCtrl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLEDNumberCtrl_GetValue. Expected _wxLEDNumberCtrl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
const wxString & _result_ref = wxLEDNumberCtrl_GetValue(_arg0);
|
||||||
|
_result = (wxString *) &_result_ref;
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
}{
|
||||||
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
|
}
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxLEDNumberCtrl_SetAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetAlignment(_swigarg0,_swigarg1))
|
||||||
|
static PyObject *_wrap_wxLEDNumberCtrl_SetAlignment(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxLEDNumberCtrl * _arg0;
|
||||||
|
wxLEDValueAlign _arg1;
|
||||||
|
bool _arg2 = (bool ) true;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
int tempbool2 = (int) true;
|
||||||
|
char *_kwnames[] = { "self","Alignment","Redraw", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxLEDNumberCtrl_SetAlignment",_kwnames,&_argo0,&_arg1,&tempbool2))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLEDNumberCtrl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLEDNumberCtrl_SetAlignment. Expected _wxLEDNumberCtrl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_arg2 = (bool ) tempbool2;
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
wxLEDNumberCtrl_SetAlignment(_arg0,_arg1,_arg2);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxLEDNumberCtrl_SetDrawFaded(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetDrawFaded(_swigarg0,_swigarg1))
|
||||||
|
static PyObject *_wrap_wxLEDNumberCtrl_SetDrawFaded(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxLEDNumberCtrl * _arg0;
|
||||||
|
bool _arg1;
|
||||||
|
bool _arg2 = (bool ) true;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
int tempbool1;
|
||||||
|
int tempbool2 = (int) true;
|
||||||
|
char *_kwnames[] = { "self","DrawFaded","Redraw", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxLEDNumberCtrl_SetDrawFaded",_kwnames,&_argo0,&tempbool1,&tempbool2))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLEDNumberCtrl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLEDNumberCtrl_SetDrawFaded. Expected _wxLEDNumberCtrl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_arg1 = (bool ) tempbool1;
|
||||||
|
_arg2 = (bool ) tempbool2;
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
wxLEDNumberCtrl_SetDrawFaded(_arg0,_arg1,_arg2);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxLEDNumberCtrl_SetValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetValue(_swigarg0,_swigarg1))
|
||||||
|
static PyObject *_wrap_wxLEDNumberCtrl_SetValue(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxLEDNumberCtrl * _arg0;
|
||||||
|
wxString * _arg1;
|
||||||
|
bool _arg2 = (bool ) true;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
PyObject * _obj1 = 0;
|
||||||
|
int tempbool2 = (int) true;
|
||||||
|
char *_kwnames[] = { "self","Value","Redraw", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxLEDNumberCtrl_SetValue",_kwnames,&_argo0,&_obj1,&tempbool2))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLEDNumberCtrl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLEDNumberCtrl_SetValue. Expected _wxLEDNumberCtrl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
#if PYTHON_API_VERSION >= 1009
|
||||||
|
char* tmpPtr; int tmpSize;
|
||||||
|
if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
|
||||||
|
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
|
||||||
|
return NULL;
|
||||||
|
_arg1 = new wxString(tmpPtr, tmpSize);
|
||||||
|
#else
|
||||||
|
if (!PyString_Check(_obj1)) {
|
||||||
|
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
_arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
_arg2 = (bool ) tempbool2;
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
wxLEDNumberCtrl_SetValue(_arg0,*_arg1,_arg2);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
{
|
||||||
|
if (_obj1)
|
||||||
|
delete _arg1;
|
||||||
|
}
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
static PyMethodDef gizmoscMethods[] = {
|
static PyMethodDef gizmoscMethods[] = {
|
||||||
|
{ "wxLEDNumberCtrl_SetValue", (PyCFunction) _wrap_wxLEDNumberCtrl_SetValue, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxLEDNumberCtrl_SetDrawFaded", (PyCFunction) _wrap_wxLEDNumberCtrl_SetDrawFaded, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxLEDNumberCtrl_SetAlignment", (PyCFunction) _wrap_wxLEDNumberCtrl_SetAlignment, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxLEDNumberCtrl_GetValue", (PyCFunction) _wrap_wxLEDNumberCtrl_GetValue, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxLEDNumberCtrl_GetDrawFaded", (PyCFunction) _wrap_wxLEDNumberCtrl_GetDrawFaded, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxLEDNumberCtrl_GetAlignment", (PyCFunction) _wrap_wxLEDNumberCtrl_GetAlignment, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxLEDNumberCtrl_Create", (PyCFunction) _wrap_wxLEDNumberCtrl_Create, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "new_wxPreLEDNumberCtrl", (PyCFunction) _wrap_new_wxPreLEDNumberCtrl, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "new_wxLEDNumberCtrl", (PyCFunction) _wrap_new_wxLEDNumberCtrl, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "new_wxSplitterScrolledWindow", (PyCFunction) _wrap_new_wxSplitterScrolledWindow, METH_VARARGS | METH_KEYWORDS },
|
{ "new_wxSplitterScrolledWindow", (PyCFunction) _wrap_new_wxSplitterScrolledWindow, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "new_wxThinSplitterWindow", (PyCFunction) _wrap_new_wxThinSplitterWindow, METH_VARARGS | METH_KEYWORDS },
|
{ "new_wxThinSplitterWindow", (PyCFunction) _wrap_new_wxThinSplitterWindow, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxTreeCompanionWindow_SetTreeCtrl", (PyCFunction) _wrap_wxTreeCompanionWindow_SetTreeCtrl, METH_VARARGS | METH_KEYWORDS },
|
{ "wxTreeCompanionWindow_SetTreeCtrl", (PyCFunction) _wrap_wxTreeCompanionWindow_SetTreeCtrl, METH_VARARGS | METH_KEYWORDS },
|
||||||
@@ -1410,6 +1789,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
|||||||
{ "_unsigned_short","_WXTYPE",0},
|
{ "_unsigned_short","_WXTYPE",0},
|
||||||
{ "_unsigned_short","_short",0},
|
{ "_unsigned_short","_short",0},
|
||||||
{ "_wxSplitterWindow","_wxThinSplitterWindow",SwigwxThinSplitterWindowTowxSplitterWindow},
|
{ "_wxSplitterWindow","_wxThinSplitterWindow",SwigwxThinSplitterWindowTowxSplitterWindow},
|
||||||
|
{ "_wxObject","_wxLEDNumberCtrl",SwigwxLEDNumberCtrlTowxObject},
|
||||||
{ "_wxObject","_wxSplitterScrolledWindow",SwigwxSplitterScrolledWindowTowxObject},
|
{ "_wxObject","_wxSplitterScrolledWindow",SwigwxSplitterScrolledWindowTowxObject},
|
||||||
{ "_wxObject","_wxThinSplitterWindow",SwigwxThinSplitterWindowTowxObject},
|
{ "_wxObject","_wxThinSplitterWindow",SwigwxThinSplitterWindowTowxObject},
|
||||||
{ "_wxObject","_wxPyTreeCompanionWindow",SwigwxPyTreeCompanionWindowTowxObject},
|
{ "_wxObject","_wxPyTreeCompanionWindow",SwigwxPyTreeCompanionWindowTowxObject},
|
||||||
@@ -1422,6 +1802,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
|||||||
{ "_signed_short","_short",0},
|
{ "_signed_short","_short",0},
|
||||||
{ "_wxScrolledWindow","_wxSplitterScrolledWindow",SwigwxSplitterScrolledWindowTowxScrolledWindow},
|
{ "_wxScrolledWindow","_wxSplitterScrolledWindow",SwigwxSplitterScrolledWindowTowxScrolledWindow},
|
||||||
{ "_unsigned_char","_byte",0},
|
{ "_unsigned_char","_byte",0},
|
||||||
|
{ "_wxControl","_wxLEDNumberCtrl",SwigwxLEDNumberCtrlTowxControl},
|
||||||
{ "_wxControl","_wxRemotelyScrolledTreeCtrl",SwigwxRemotelyScrolledTreeCtrlTowxControl},
|
{ "_wxControl","_wxRemotelyScrolledTreeCtrl",SwigwxRemotelyScrolledTreeCtrlTowxControl},
|
||||||
{ "_unsigned_int","_wxCoord",0},
|
{ "_unsigned_int","_wxCoord",0},
|
||||||
{ "_unsigned_int","_wxPrintQuality",0},
|
{ "_unsigned_int","_wxPrintQuality",0},
|
||||||
@@ -1471,12 +1852,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
|||||||
{ "_wxCoord","_size_t",0},
|
{ "_wxCoord","_size_t",0},
|
||||||
{ "_wxCoord","_time_t",0},
|
{ "_wxCoord","_time_t",0},
|
||||||
{ "_wxCoord","_wxPrintQuality",0},
|
{ "_wxCoord","_wxPrintQuality",0},
|
||||||
|
{ "_wxEvtHandler","_wxLEDNumberCtrl",SwigwxLEDNumberCtrlTowxEvtHandler},
|
||||||
{ "_wxEvtHandler","_wxSplitterScrolledWindow",SwigwxSplitterScrolledWindowTowxEvtHandler},
|
{ "_wxEvtHandler","_wxSplitterScrolledWindow",SwigwxSplitterScrolledWindowTowxEvtHandler},
|
||||||
{ "_wxEvtHandler","_wxThinSplitterWindow",SwigwxThinSplitterWindowTowxEvtHandler},
|
{ "_wxEvtHandler","_wxThinSplitterWindow",SwigwxThinSplitterWindowTowxEvtHandler},
|
||||||
{ "_wxEvtHandler","_wxPyTreeCompanionWindow",SwigwxPyTreeCompanionWindowTowxEvtHandler},
|
{ "_wxEvtHandler","_wxPyTreeCompanionWindow",SwigwxPyTreeCompanionWindowTowxEvtHandler},
|
||||||
{ "_wxEvtHandler","_wxRemotelyScrolledTreeCtrl",SwigwxRemotelyScrolledTreeCtrlTowxEvtHandler},
|
{ "_wxEvtHandler","_wxRemotelyScrolledTreeCtrl",SwigwxRemotelyScrolledTreeCtrlTowxEvtHandler},
|
||||||
{ "_wxEvtHandler","_wxEditableListBox",SwigwxEditableListBoxTowxEvtHandler},
|
{ "_wxEvtHandler","_wxEditableListBox",SwigwxEditableListBoxTowxEvtHandler},
|
||||||
{ "_wxEvtHandler","_wxDynamicSashWindow",SwigwxDynamicSashWindowTowxEvtHandler},
|
{ "_wxEvtHandler","_wxDynamicSashWindow",SwigwxDynamicSashWindowTowxEvtHandler},
|
||||||
|
{ "_wxWindow","_wxLEDNumberCtrl",SwigwxLEDNumberCtrlTowxWindow},
|
||||||
{ "_wxWindow","_wxSplitterScrolledWindow",SwigwxSplitterScrolledWindowTowxWindow},
|
{ "_wxWindow","_wxSplitterScrolledWindow",SwigwxSplitterScrolledWindowTowxWindow},
|
||||||
{ "_wxWindow","_wxThinSplitterWindow",SwigwxThinSplitterWindowTowxWindow},
|
{ "_wxWindow","_wxThinSplitterWindow",SwigwxThinSplitterWindowTowxWindow},
|
||||||
{ "_wxWindow","_wxPyTreeCompanionWindow",SwigwxPyTreeCompanionWindowTowxWindow},
|
{ "_wxWindow","_wxPyTreeCompanionWindow",SwigwxPyTreeCompanionWindowTowxWindow},
|
||||||
@@ -1498,6 +1881,11 @@ SWIGEXPORT(void) initgizmosc() {
|
|||||||
PyDict_SetItemString(d,"wxEVT_DYNAMIC_SASH_UNIFY", PyInt_FromLong((long) wxEVT_DYNAMIC_SASH_UNIFY));
|
PyDict_SetItemString(d,"wxEVT_DYNAMIC_SASH_UNIFY", PyInt_FromLong((long) wxEVT_DYNAMIC_SASH_UNIFY));
|
||||||
PyDict_SetItemString(d,"wxDS_MANAGE_SCROLLBARS", PyInt_FromLong((long) wxDS_MANAGE_SCROLLBARS));
|
PyDict_SetItemString(d,"wxDS_MANAGE_SCROLLBARS", PyInt_FromLong((long) wxDS_MANAGE_SCROLLBARS));
|
||||||
PyDict_SetItemString(d,"wxDS_DRAG_CORNER", PyInt_FromLong((long) wxDS_DRAG_CORNER));
|
PyDict_SetItemString(d,"wxDS_DRAG_CORNER", PyInt_FromLong((long) wxDS_DRAG_CORNER));
|
||||||
|
PyDict_SetItemString(d,"wxLED_ALIGN_LEFT", PyInt_FromLong((long) wxLED_ALIGN_LEFT));
|
||||||
|
PyDict_SetItemString(d,"wxLED_ALIGN_RIGHT", PyInt_FromLong((long) wxLED_ALIGN_RIGHT));
|
||||||
|
PyDict_SetItemString(d,"wxLED_ALIGN_CENTER", PyInt_FromLong((long) wxLED_ALIGN_CENTER));
|
||||||
|
PyDict_SetItemString(d,"wxLED_ALIGN_MASK", PyInt_FromLong((long) wxLED_ALIGN_MASK));
|
||||||
|
PyDict_SetItemString(d,"wxLED_DRAW_FADED", PyInt_FromLong((long) wxLED_DRAW_FADED));
|
||||||
|
|
||||||
|
|
||||||
wxClassInfo::CleanUpClasses();
|
wxClassInfo::CleanUpClasses();
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
#include <wx/gizmos/dynamicsash.h>
|
#include <wx/gizmos/dynamicsash.h>
|
||||||
#include <wx/gizmos/editlbox.h>
|
#include <wx/gizmos/editlbox.h>
|
||||||
#include <wx/gizmos/splittree.h>
|
#include <wx/gizmos/splittree.h>
|
||||||
|
#include <wx/gizmos/ledctrl.h>
|
||||||
%}
|
%}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
@@ -322,6 +323,52 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
enum wxLEDValueAlign
|
||||||
|
{
|
||||||
|
wxLED_ALIGN_LEFT,
|
||||||
|
wxLED_ALIGN_RIGHT,
|
||||||
|
wxLED_ALIGN_CENTER,
|
||||||
|
|
||||||
|
wxLED_ALIGN_MASK,
|
||||||
|
|
||||||
|
wxLED_DRAW_FADED,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class wxLEDNumberCtrl : public wxControl
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// Constructors.
|
||||||
|
wxLEDNumberCtrl(wxWindow *parent, wxWindowID id = -1,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxLED_ALIGN_LEFT | wxLED_DRAW_FADED);
|
||||||
|
%name(wxPreLEDNumberCtrl) wxLEDNumberCtrl();
|
||||||
|
|
||||||
|
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
|
||||||
|
%pragma(python) addtomethod = "wxPreLEDNumberCtrl:val._setOORInfo(val)"
|
||||||
|
|
||||||
|
// Create functions.
|
||||||
|
bool Create(wxWindow *parent, wxWindowID id = -1,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxLED_ALIGN_LEFT | wxLED_DRAW_FADED);
|
||||||
|
|
||||||
|
wxLEDValueAlign GetAlignment() const { return m_Alignment; }
|
||||||
|
bool GetDrawFaded() const { return m_DrawFaded; }
|
||||||
|
const wxString &GetValue() const { return m_Value; }
|
||||||
|
|
||||||
|
void SetAlignment(wxLEDValueAlign Alignment, bool Redraw = true);
|
||||||
|
void SetDrawFaded(bool DrawFaded, bool Redraw = true);
|
||||||
|
void SetValue(const wxString &Value, bool Redraw = true);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
%init %{
|
%init %{
|
||||||
|
@@ -218,6 +218,48 @@ class wxSplitterScrolledWindow(wxSplitterScrolledWindowPtr):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class wxLEDNumberCtrlPtr(wxControlPtr):
|
||||||
|
def __init__(self,this):
|
||||||
|
self.this = this
|
||||||
|
self.thisown = 0
|
||||||
|
def Create(self, *_args, **_kwargs):
|
||||||
|
val = apply(gizmosc.wxLEDNumberCtrl_Create,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def GetAlignment(self, *_args, **_kwargs):
|
||||||
|
val = apply(gizmosc.wxLEDNumberCtrl_GetAlignment,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def GetDrawFaded(self, *_args, **_kwargs):
|
||||||
|
val = apply(gizmosc.wxLEDNumberCtrl_GetDrawFaded,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def GetValue(self, *_args, **_kwargs):
|
||||||
|
val = apply(gizmosc.wxLEDNumberCtrl_GetValue,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def SetAlignment(self, *_args, **_kwargs):
|
||||||
|
val = apply(gizmosc.wxLEDNumberCtrl_SetAlignment,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def SetDrawFaded(self, *_args, **_kwargs):
|
||||||
|
val = apply(gizmosc.wxLEDNumberCtrl_SetDrawFaded,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def SetValue(self, *_args, **_kwargs):
|
||||||
|
val = apply(gizmosc.wxLEDNumberCtrl_SetValue,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def __repr__(self):
|
||||||
|
return "<C wxLEDNumberCtrl instance at %s>" % (self.this,)
|
||||||
|
class wxLEDNumberCtrl(wxLEDNumberCtrlPtr):
|
||||||
|
def __init__(self,*_args,**_kwargs):
|
||||||
|
self.this = apply(gizmosc.new_wxLEDNumberCtrl,_args,_kwargs)
|
||||||
|
self.thisown = 1
|
||||||
|
self._setOORInfo(self)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def wxPreLEDNumberCtrl(*_args,**_kwargs):
|
||||||
|
val = wxLEDNumberCtrlPtr(apply(gizmosc.new_wxPreLEDNumberCtrl,_args,_kwargs))
|
||||||
|
val.thisown = 1
|
||||||
|
val._setOORInfo(val)
|
||||||
|
return val
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#-------------- FUNCTION WRAPPERS ------------------
|
#-------------- FUNCTION WRAPPERS ------------------
|
||||||
@@ -230,6 +272,11 @@ wxEVT_DYNAMIC_SASH_SPLIT = gizmosc.wxEVT_DYNAMIC_SASH_SPLIT
|
|||||||
wxEVT_DYNAMIC_SASH_UNIFY = gizmosc.wxEVT_DYNAMIC_SASH_UNIFY
|
wxEVT_DYNAMIC_SASH_UNIFY = gizmosc.wxEVT_DYNAMIC_SASH_UNIFY
|
||||||
wxDS_MANAGE_SCROLLBARS = gizmosc.wxDS_MANAGE_SCROLLBARS
|
wxDS_MANAGE_SCROLLBARS = gizmosc.wxDS_MANAGE_SCROLLBARS
|
||||||
wxDS_DRAG_CORNER = gizmosc.wxDS_DRAG_CORNER
|
wxDS_DRAG_CORNER = gizmosc.wxDS_DRAG_CORNER
|
||||||
|
wxLED_ALIGN_LEFT = gizmosc.wxLED_ALIGN_LEFT
|
||||||
|
wxLED_ALIGN_RIGHT = gizmosc.wxLED_ALIGN_RIGHT
|
||||||
|
wxLED_ALIGN_CENTER = gizmosc.wxLED_ALIGN_CENTER
|
||||||
|
wxLED_ALIGN_MASK = gizmosc.wxLED_ALIGN_MASK
|
||||||
|
wxLED_DRAW_FADED = gizmosc.wxLED_DRAW_FADED
|
||||||
|
|
||||||
|
|
||||||
#-------------- USER INCLUDE -----------------------
|
#-------------- USER INCLUDE -----------------------
|
||||||
|
@@ -39,6 +39,7 @@ _treeList = [
|
|||||||
'wxDynamicSashWindow',
|
'wxDynamicSashWindow',
|
||||||
'wxEditableListBox',
|
'wxEditableListBox',
|
||||||
'SplitTree',
|
'SplitTree',
|
||||||
|
'wxLEDNumberCtrl',
|
||||||
]),
|
]),
|
||||||
|
|
||||||
('Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame',
|
('Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame',
|
||||||
@@ -62,7 +63,7 @@ _treeList = [
|
|||||||
'wxTreeCtrl', 'wxSpinButton', 'wxSpinCtrl', 'wxStaticText',
|
'wxTreeCtrl', 'wxSpinButton', 'wxSpinCtrl', 'wxStaticText',
|
||||||
'wxStaticBitmap', 'wxRadioBox', 'wxSlider', 'wxToolBar',
|
'wxStaticBitmap', 'wxRadioBox', 'wxSlider', 'wxToolBar',
|
||||||
'wxCalendarCtrl', 'wxToggleButton',
|
'wxCalendarCtrl', 'wxToggleButton',
|
||||||
'wxEditableListBox',
|
'wxEditableListBox', 'wxLEDNumberCtrl',
|
||||||
]),
|
]),
|
||||||
|
|
||||||
('Window Layout', ['wxLayoutConstraints', 'LayoutAnchors', 'Sizers', 'XML_Resource']),
|
('Window Layout', ['wxLayoutConstraints', 'LayoutAnchors', 'Sizers', 'XML_Resource']),
|
||||||
|
49
wxPython/demo/wxLEDNumberCtrl.py
Normal file
49
wxPython/demo/wxLEDNumberCtrl.py
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
|
||||||
|
from wxPython.wx import *
|
||||||
|
from wxPython.gizmos import *
|
||||||
|
|
||||||
|
import time
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
class TestPanel(wxPanel):
|
||||||
|
def __init__(self, parent, log):
|
||||||
|
wxPanel.__init__(self, parent, -1)
|
||||||
|
self.log = log
|
||||||
|
|
||||||
|
led = wxLEDNumberCtrl(self, -1, (25,25), (280, 50))
|
||||||
|
led.SetValue("0123456789")
|
||||||
|
led.SetAlignment(wxLED_ALIGN_RIGHT)
|
||||||
|
|
||||||
|
led = wxLEDNumberCtrl(self, -1, (25,100), (280, 50))
|
||||||
|
led.SetValue("0123456789")
|
||||||
|
led.SetAlignment(wxLED_ALIGN_RIGHT)
|
||||||
|
led.SetDrawFaded(false)
|
||||||
|
|
||||||
|
led = wxLEDNumberCtrl(self, -1, (25,175), (280, 50),
|
||||||
|
wxLED_ALIGN_CENTER)# | wxLED_DRAW_FADED)
|
||||||
|
self.clock = led
|
||||||
|
self.OnTimer(None)
|
||||||
|
|
||||||
|
self.timer = wxTimer(self)
|
||||||
|
self.timer.Start(1000)
|
||||||
|
EVT_TIMER(self, -1, self.OnTimer)
|
||||||
|
|
||||||
|
|
||||||
|
def OnTimer(self, evt):
|
||||||
|
t = time.localtime(time.time())
|
||||||
|
st = time.strftime("%I-%M-%S", t)
|
||||||
|
self.clock.SetValue(st)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
def runTest(frame, nb, log):
|
||||||
|
win = TestPanel(nb, log)
|
||||||
|
return win
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
overview = """\
|
||||||
|
"""
|
@@ -778,8 +778,9 @@ if not GL_ONLY and BUILD_GIZMOS:
|
|||||||
ext = Extension('gizmosc', [
|
ext = Extension('gizmosc', [
|
||||||
'%s/dynamicsash.cpp' % GIZMOLOC,
|
'%s/dynamicsash.cpp' % GIZMOLOC,
|
||||||
'%s/editlbox.cpp' % GIZMOLOC,
|
'%s/editlbox.cpp' % GIZMOLOC,
|
||||||
'%s/multicell.cpp' % GIZMOLOC,
|
#'%s/multicell.cpp' % GIZMOLOC,
|
||||||
'%s/splittree.cpp' % GIZMOLOC,
|
'%s/splittree.cpp' % GIZMOLOC,
|
||||||
|
'%s/ledctrl.cpp' % GIZMOLOC,
|
||||||
] + swig_sources,
|
] + swig_sources,
|
||||||
|
|
||||||
include_dirs = gizmos_includes,
|
include_dirs = gizmos_includes,
|
||||||
|
Reference in New Issue
Block a user