]> git.saurik.com Git - wxWidgets.git/blame - contrib/samples/ogl/studio/project.cpp
Sample update - wxTE_AUTO_URL from Mart R. [patch 1126182]
[wxWidgets.git] / contrib / samples / ogl / studio / project.cpp
CommitLineData
1fc25a89
JS
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
28IMPLEMENT_CLASS(csProjectTreeCtrl, wxTreeCtrl)
29
30BEGIN_EVENT_TABLE(csProjectTreeCtrl, wxTreeCtrl)
31END_EVENT_TABLE()
32
33// Define my frame constructor
2ba06d5a 34csProjectTreeCtrl::csProjectTreeCtrl(wxWindow *parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style):
1fc25a89
JS
35
36 wxTreeCtrl(parent, id, pos, size, style),
37 m_imageList(16, 16)
38{
1484b5cc
VS
39 m_imageList.Add(wxIcon(_T("folder1")));
40 m_imageList.Add(wxIcon(_T("file1")));
1fc25a89
JS
41
42 SetImageList(& m_imageList);
43}
44
45csProjectTreeCtrl::~csProjectTreeCtrl()
46{
47 SetImageList(NULL);
48}
49
50// Create the project window
1484b5cc 51bool csApp::CreateProjectWindow(wxFrame *WXUNUSED(parent))
1fc25a89
JS
52{
53#if 0
54 // Create a layout window
55 wxSashLayoutWindow* win = new wxSashLayoutWindow(parent, ID_LAYOUT_WINDOW_PROJECT, wxDefaultPosition, wxSize(200, 30), wxNO_BORDER|wxSW_3D|wxCLIP_CHILDREN);
56 win->SetDefaultSize(wxSize(150, 10000));
57 win->SetOrientation(wxLAYOUT_VERTICAL);
58 win->SetAlignment(wxLAYOUT_LEFT);
e1c6c6ae 59 win->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
2ba06d5a 60 win->SetSashVisible(wxSASH_RIGHT, true);
1fc25a89
JS
61 win->SetExtraBorderSize(5);
62
63 m_projectSashWindow = win;
64
65 m_projectTreeCtrl = new csProjectTreeCtrl(win, ID_WINDOW_PROJECT_TREE, wxDefaultPosition,
66 wxDefaultSize, wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT|wxDOUBLE_BORDER);
67
68 // For now, hide the window
2ba06d5a 69 m_projectSashWindow->Show(false);
1fc25a89
JS
70#endif
71
2ba06d5a 72 return true;
1fc25a89
JS
73}
74
75// Fill out the project tree control
76void csApp::FillProjectTreeCtrl()
77{
78#if 0
79 csProjectTreeCtrl& tree = *GetProjectTreeCtrl();
80
81 // Dummy data for now
82 long level0 = tree.InsertItem(0, "Applications", 0, 0);
83 long level1 = tree.InsertItem(level0, "Projects", 0, 0);
84 tree.InsertItem(level1, "project1", 1, 1);
85 tree.InsertItem(level1, "project2", 1, 1);
86#endif
87}
88