2
* This file is part of wxSmith plugin for Code::Blocks Studio
3
* Copyright (C) 2006-2007 Bartlomiej Swiecki
5
* wxSmith is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 3 of the License, or
8
* (at your option) any later version.
10
* wxSmith is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with wxSmith. If not, see <http://www.gnu.org/licenses/>.
19
* $Id: wxstimer.cpp 7109 2011-04-15 11:53:16Z mortenmacfly $
20
* $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-16.xx/src/plugins/contrib/wxSmith/wxwidgets/defitems/wxstimer.cpp $
24
#include "../wxsitemresdata.h"
29
wxsRegisterItem<wxsTimer> Reg(_T("Timer"),wxsTTool,_T("Tools"),20,false);
31
WXS_EV_BEGIN(wxsTimerEvents)
32
WXS_EVI(EVT_TIMER,wxEVT_TIMER,wxTimerEvent,Trigger)
37
wxsTimer::wxsTimer(wxsItemResData* Data):
43
flVariable|flId|flSubclass|flExtraCode)
49
void wxsTimer::OnBuildCreatingCode()
51
switch ( GetLanguage() )
55
AddHeader(_T("<wx/timer.h>"),GetInfo().ClassName,hfInPCH);
56
Codef(_T("%ASetOwner(this, %I);\n"));
57
if ( m_Interval > 0 ) Codef(_T("%AStart(%d, %b);\n"),m_Interval,m_OneShot);
58
BuildSetupWindowCode();
64
wxsCodeMarks::Unknown(_T("wxsTimer::OnBuildCreatingCode"),GetLanguage());
69
void wxsTimer::OnEnumToolProperties(long Flags)
71
WXS_LONG(wxsTimer,m_Interval,_("Interval"),_T("interval"),0);
72
WXS_BOOL(wxsTimer,m_OneShot,_("One Shot"),_T("oneshot"),false);