~efargaspro/+junk/codeblocks-16.01-release

« back to all changes in this revision

Viewing changes to src/plugins/contrib/wxSmith/wxwidgets/defitems/wxsstaticline.cpp

  • Committer: damienlmoore at gmail
  • Date: 2016-02-02 02:43:22 UTC
  • Revision ID: damienlmoore@gmail.com-20160202024322-yql5qmtbwdyamdwd
Code::BlocksĀ 16.01

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
* This file is part of wxSmith plugin for Code::Blocks Studio
 
3
* Copyright (C) 2006-2007  Bartlomiej Swiecki
 
4
*
 
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.
 
9
*
 
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.
 
14
*
 
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/>.
 
17
*
 
18
* $Revision: 7109 $
 
19
* $Id: wxsstaticline.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/wxsstaticline.cpp $
 
21
*/
 
22
 
 
23
#include "wxsstaticline.h"
 
24
 
 
25
#include <wx/statline.h>
 
26
 
 
27
namespace
 
28
{
 
29
    wxsRegisterItem<wxsStaticLine> Reg(_T("StaticLine"),wxsTWidget,_T("Standard"),60);
 
30
 
 
31
    WXS_ST_BEGIN(wxsStaticLineStyles,_T("wxLI_HORIZONTAL"))
 
32
        WXS_ST_CATEGORY("wxStaticLine")
 
33
        WXS_ST(wxLI_HORIZONTAL)
 
34
        WXS_ST(wxLI_VERTICAL)
 
35
        WXS_ST_DEFAULTS()
 
36
    WXS_ST_END()
 
37
 
 
38
 
 
39
    WXS_EV_BEGIN(wxsStaticLineEvents)
 
40
    WXS_EV_END()
 
41
}
 
42
 
 
43
wxsStaticLine::wxsStaticLine(wxsItemResData* Data):
 
44
    wxsWidget(
 
45
        Data,
 
46
        &Reg.Info,
 
47
        wxsStaticLineEvents,
 
48
        wxsStaticLineStyles)
 
49
{
 
50
    // Default the size so that it can be seen in the edit mode
 
51
    GetBaseProps()->m_Size.IsDefault = false;
 
52
    GetBaseProps()->m_Size.X = 10;
 
53
    GetBaseProps()->m_Size.Y = -1;
 
54
}
 
55
 
 
56
void wxsStaticLine::OnBuildCreatingCode()
 
57
{
 
58
    switch ( GetLanguage() )
 
59
    {
 
60
        case wxsCPP:
 
61
        {
 
62
            AddHeader(_T("<wx/statline.h>"),GetInfo().ClassName,0);
 
63
            Codef(_T("%C(%W, %I, %P, %S, %T, %N);\n"));
 
64
            BuildSetupWindowCode();
 
65
            return;
 
66
        }
 
67
 
 
68
        default:
 
69
        {
 
70
            wxsCodeMarks::Unknown(_T("wxsStaticLine::OnBuildCreatingCode"),GetLanguage());
 
71
        }
 
72
    }
 
73
}
 
74
 
 
75
 
 
76
wxObject* wxsStaticLine::OnBuildPreview(wxWindow* Parent,long Flags)
 
77
{
 
78
    wxStaticLine* Preview = new wxStaticLine(Parent,GetId(),Pos(Parent),Size(Parent),Style());
 
79
    return SetupWindow(Preview,Flags);
 
80
}
 
81
 
 
82
void wxsStaticLine::OnEnumWidgetProperties(long Flags)
 
83
{
 
84
}