]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: project.cpp | |
3 | // Purpose: Studio project classes | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 27/7/98 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart | |
9 | // Licence: | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | // For compilers that support precompilation, includes "wx/wx.h". | |
13 | #include "wx/wxprec.h" | |
14 | ||
15 | #ifdef __BORLANDC__ | |
16 | #pragma hdrstop | |
17 | #endif | |
18 | ||
19 | #ifndef WX_PRECOMP | |
20 | #include "wx/wx.h" | |
21 | #include "wx/mdi.h" | |
22 | #endif | |
23 | ||
24 | #include "wx/laywin.h" | |
25 | #include "studio.h" | |
26 | #include "project.h" | |
27 | ||
28 | IMPLEMENT_CLASS(csProjectTreeCtrl, wxTreeCtrl) | |
29 | ||
30 | BEGIN_EVENT_TABLE(csProjectTreeCtrl, wxTreeCtrl) | |
31 | END_EVENT_TABLE() | |
32 | ||
33 | // Define my frame constructor | |
34 | csProjectTreeCtrl::csProjectTreeCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, | |
35 | long style): | |
36 | ||
37 | wxTreeCtrl(parent, id, pos, size, style), | |
38 | m_imageList(16, 16) | |
39 | { | |
40 | m_imageList.Add(wxIcon("folder1")); | |
41 | m_imageList.Add(wxIcon("file1")); | |
42 | ||
43 | SetImageList(& m_imageList); | |
44 | } | |
45 | ||
46 | csProjectTreeCtrl::~csProjectTreeCtrl() | |
47 | { | |
48 | SetImageList(NULL); | |
49 | } | |
50 | ||
51 | // Create the project window | |
52 | bool csApp::CreateProjectWindow(wxFrame *parent) | |
53 | { | |
54 | #if 0 | |
55 | // Create a layout window | |
56 | wxSashLayoutWindow* win = new wxSashLayoutWindow(parent, ID_LAYOUT_WINDOW_PROJECT, wxDefaultPosition, wxSize(200, 30), wxNO_BORDER|wxSW_3D|wxCLIP_CHILDREN); | |
57 | win->SetDefaultSize(wxSize(150, 10000)); | |
58 | win->SetOrientation(wxLAYOUT_VERTICAL); | |
59 | win->SetAlignment(wxLAYOUT_LEFT); | |
60 | win->SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); | |
61 | win->SetSashVisible(wxSASH_RIGHT, TRUE); | |
62 | win->SetExtraBorderSize(5); | |
63 | ||
64 | m_projectSashWindow = win; | |
65 | ||
66 | m_projectTreeCtrl = new csProjectTreeCtrl(win, ID_WINDOW_PROJECT_TREE, wxDefaultPosition, | |
67 | wxDefaultSize, wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT|wxDOUBLE_BORDER); | |
68 | ||
69 | // For now, hide the window | |
70 | m_projectSashWindow->Show(FALSE); | |
71 | #endif | |
72 | ||
73 | return TRUE; | |
74 | } | |
75 | ||
76 | // Fill out the project tree control | |
77 | void csApp::FillProjectTreeCtrl() | |
78 | { | |
79 | #if 0 | |
80 | csProjectTreeCtrl& tree = *GetProjectTreeCtrl(); | |
81 | ||
82 | // Dummy data for now | |
83 | long level0 = tree.InsertItem(0, "Applications", 0, 0); | |
84 | long level1 = tree.InsertItem(level0, "Projects", 0, 0); | |
85 | tree.InsertItem(level1, "project1", 1, 1); | |
86 | tree.InsertItem(level1, "project2", 1, 1); | |
87 | #endif | |
88 | } | |
89 |