~hikiko/nux/arb-srgba-shader

« back to all changes in this revision

Viewing changes to NuxCore/Win32Dialogs/NWin32CustomDialog.h

  • Committer: Neil Jagdish Patel
  • Date: 2010-09-01 19:25:37 UTC
  • Revision ID: neil.patel@canonical.com-20100901192537-mfz7rm6q262pewg6
Import and build NuxCore

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef NWIN32CUSTOMDIALOG_H
 
2
#define NWIN32CUSTOMDIALOG_H
 
3
 
 
4
 
 
5
#define INL_COLOR_DIALOG_CUSTOM_COLOR 16
 
6
 
 
7
NAMESPACE_BEGIN
 
8
 
 
9
class FileDialogOption
 
10
{
 
11
public:
 
12
    FileDialogOption();
 
13
    ~FileDialogOption();
 
14
 
 
15
    void    AddFilter(const TCHAR* Description, const TCHAR* Filter);
 
16
    TCHAR*  GetFormatedFilter();
 
17
    void    RemoveFilter();
 
18
 
 
19
    void            SetDialogTitle(const TCHAR* Title);
 
20
    const TCHAR*    GetDialogTitle() { return *DialogTitle; }
 
21
    void            SetInitialDirectory(const TCHAR* Directory);
 
22
    const TCHAR*    GetInitialDirectory() { return *InitialDirectory; }
 
23
 
 
24
 
 
25
public:
 
26
    NFileName ReturnFileName;
 
27
    std::vector<NString> FilterDesc;
 
28
    std::vector<NString> Filters;
 
29
    TCHAR* FormattedFilter;
 
30
    t_u32 FilterLength;
 
31
    t_u32 NumFilters;
 
32
    NString DialogTitle;
 
33
    NString InitialDirectory;
 
34
};
 
35
 
 
36
 
 
37
class ColorDialogOption
 
38
{
 
39
public:
 
40
    ColorDialogOption();
 
41
    ~ColorDialogOption();
 
42
 
 
43
    void SetCustomColor(t_u32 index, t_u32 RGBColor);
 
44
    void SetCustomColor(t_u32 index, BYTE R, BYTE G, BYTE B);
 
45
 
 
46
 
 
47
public:
 
48
    COLORREF m_CustomColors[INL_COLOR_DIALOG_CUSTOM_COLOR];
 
49
    Color m_ReturnColor;
 
50
};
 
51
 
 
52
 
 
53
bool Win32ColorDialog(HWND hWnd, ColorDialogOption& cdo);
 
54
 
 
55
//! Open Win32 file Dialog
 
56
/*! 
 
57
    Open Win32 file Dialog
 
58
    Adding filter options
 
59
        FileDialogOption fdo;
 
60
        fdo.AddFilter(TEXT("All Files (*.*)"), TEXT("*.*"));
 
61
        fdo.AddFilter(TEXT("All Text (*.txt)"), TEXT("*.txt"));
 
62
        fdo.AddFilter(TEXT("All Images (*.bmp, *.tga, *.jpeg, *.png)"), TEXT("*.bmp;*.tga;*.jpeg;*.png"));
 
63
*/
 
64
bool Win32SaveFileDialog(HWND hWnd, FileDialogOption& fdo);
 
65
bool Win32OpenFileDialog(HWND hWnd, FileDialogOption& fdo);
 
66
 
 
67
NAMESPACE_END
 
68
 
 
69
#endif // NWIN32CUSTOMDIALOG_H