Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/ogre/Tools/3dsmaxExport/LEXIExporter/LexiExport/Sources/LexiDialogAddMultiple.h @ 45

Last change on this file since 45 was 6, checked in by anonymous, 18 years ago

=…

File size: 2.6 KB
Line 
1/*
2-----------------------------------------------------------------------------
3This source file is part of LEXIExporter
4
5Copyright 2006 NDS Limited
6
7Author(s):
8Lasse Tassing
9
10This program is free software; you can redistribute it and/or modify it under
11the terms of the GNU Lesser General Public License as published by the Free Software
12Foundation; either version 2 of the License, or (at your option) any later
13version.
14
15This program is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
18
19You should have received a copy of the GNU Lesser General Public License along with
20this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21Place - Suite 330, Boston, MA 02111-1307, USA, or go to
22http://www.gnu.org/copyleft/lesser.txt.
23-----------------------------------------------------------------------------
24*/
25#ifndef __NDS_LexiExporter_AddMultipleDialog__
26#define __NDS_LexiExporter_AddMultipleDialog__
27
28//
29class CAddMultipleDlg : public GDI::Dialog
30{
31public:
32        // Struct to hold information about each item in listbox (custom drawed)
33        struct SListItem
34        {
35                INode* pNode;
36                SClass_ID NodeClassID;
37                std::string sNodeName;
38                int     ExportType;
39                bool bCanEdit;
40        };
41
42        CAddMultipleDlg(Window* pParent, CExporterPropertiesDlg *pOwner, CExportObject *pRootObject);
43        ~CAddMultipleDlg();
44
45        // If dialog returns IDOK, a list of export items can be retrieved from this function
46        vector<SListItem*>      GetExportItems();
47
48protected:
49        virtual void OnInitDialog();
50
51        // Custom drawed listbox
52        GDI::ListBox    m_ListBox;     
53
54        // Dropdown listbox
55        GDI::ListBox    m_TypePopup;
56        SListItem*              m_pEditItem;
57
58        // Parent ExportObject
59        CExportObject* m_pRootObject;
60
61        //
62        CExporterPropertiesDlg *m_pOwner;
63
64        // Icons for item list
65        HIMAGELIST m_hImageList;
66        std::map<SClass_ID, unsigned int> m_ImageListMap;
67
68        // Selected items
69        vector<CAddMultipleDlg::SListItem*> m_lSelectedItems;
70
71        // Original Client Rectangle (initialize in OnInitDialog())
72        RECT    m_OrgClientRect;
73
74        // Windows callback function
75        static INT_PTR CALLBACK DlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
76
77        // Invoked when each item in the listbox should be redrawed
78        INT_PTR OnDrawItem(LPDRAWITEMSTRUCT pCD);
79
80        // Handle size changes
81        void OnSize();
82
83        //
84        void MakeResult();
85
86        //
87        void CloseTypePopup();
88
89        //
90        void OnTypeSelChange();
91
92        // Called when user clicks on listbox
93        void OnChildClick(POINT &pt);
94
95        // Generate list of selected MAX objects and add them to listbox as SListItem(s)
96        void PopulateView(void);
97};
98
99//
100
101#endif // __NDS_LexiExporter_SelectNodeDialog__
Note: See TracBrowser for help on using the repository browser.