Code::Blocks
SVN r11506
src
associations.h
Go to the documentation of this file.
1
/*
2
* This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
3
* http://www.gnu.org/licenses/gpl-3.0.html
4
*/
5
6
#ifndef ASSOCIATIONS_H
7
#define ASSOCIATIONS_H
8
9
#include "
scrollingdialog.h
"
10
#include <
wx/intl.h
>
11
#include <
wx/string.h
>
12
#ifdef __WXMSW__
13
#include <
wx/msw/registry.h
>
14
#include <shlobj.h>
// for SHChangeNotify()
15
#ifdef __CBDEBUG__
16
#include <windows.h>
17
#include <wincon.h>
18
#endif
19
#define DDE_SERVICE _T("CODEBLOCKS")
20
#else
21
#define DDE_SERVICE _T("/tmp/CODEBLOCKS%s.socket")
22
#endif
23
#define DDE_TOPIC _T("CodeBlocksDDEServer")
24
#include <
wx/ipc.h
>
25
26
class
wxCheckListBox
;
27
class
wxWindow
;
28
class
wxCommandEvent
;
29
30
namespace
Associations
31
{
32
struct
Assoc
33
{
34
wxString
ext
;
35
wxString
descr
;
36
int
index
;
37
};
38
39
unsigned
int
CountAssocs
();
40
41
void
SetCore
();
42
void
SetAll
();
43
void
ClearAll
();
44
void
SetBatchBuildOnly
();
45
bool
Check
();
46
47
void
DoSetAssociation
(
const
wxString
&
ext
,
const
wxString
&
descr
,
const
wxString
& exe,
int
icoNum);
48
bool
DoCheckAssociation
(
const
wxString
&
ext
,
const
wxString
&
descr
,
const
wxString
& exe,
int
icoNum);
// TODO: descriptions are not checked at all, and actually it's not necessary
49
// (extension + executable is actually enough)
50
// ---> decide whether to remove parameter from "Check" function or implement
51
void
DoClearAssociation
(
const
wxString
&
ext
);
52
53
void
UpdateChanges
();
54
}
55
56
class
ManageAssocsDialog
:
public
wxScrollingDialog
57
{
58
wxCheckListBox
*
list
;
59
60
public
:
61
ManageAssocsDialog
(
wxWindow
* parent);
62
protected
:
63
void
OnApply(
wxCommandEvent
& event);
64
void
OnCancel(
wxCommandEvent
& event);
65
void
OnClearAll(
wxCommandEvent
& event);
66
private
:
67
DECLARE_EVENT_TABLE()
68
};
69
70
#define ASC_ASSOC_DLG_NO_DONT_ASK 0
71
#define ASC_ASSOC_DLG_NO_ONLY_NOW 1
72
#define ASC_ASSOC_DLG_YES_C_FILES 2
73
#define ASC_ASSOC_DLG_YES_ALL_FILES 3
74
75
class
AskAssocDialog
:
public
wxScrollingDialog
76
{
77
public
:
78
AskAssocDialog
(
wxWindow
* parent);
79
protected
:
80
void
OnOK(
wxCommandEvent
& event);
81
void
OnESC(
wxCommandEvent
& event);
82
void
OnCharHook(
wxKeyEvent
& event);
83
private
:
84
DECLARE_EVENT_TABLE()
85
};
86
87
88
89
#endif // ASSOCIATIONS_H
Associations::Assoc::index
int index
Definition:
associations.h:36
Associations::Check
bool Check()
Definition:
associations.cpp:133
intl.h
Associations::Assoc::descr
wxString descr
Definition:
associations.h:35
string.h
ManageAssocsDialog
Definition:
associations.h:56
wxScrollingDialog
Definition:
scrollingdialog.h:163
scrollingdialog.h
Associations::SetAll
void SetAll()
Definition:
associations.cpp:111
wxCommandEvent
Associations::Assoc::ext
wxString ext
Definition:
associations.h:34
Associations
Definition:
associations.h:30
wxString
Associations::UpdateChanges
void UpdateChanges()
Definition:
associations.cpp:95
Associations::SetBatchBuildOnly
void SetBatchBuildOnly()
Definition:
associations.cpp:84
Associations::SetCore
void SetCore()
Definition:
associations.cpp:100
Associations::DoClearAssociation
void DoClearAssociation(const wxString &ext)
Definition:
associations.cpp:200
wxKeyEvent
Associations::DoSetAssociation
void DoSetAssociation(const wxString &ext, const wxString &descr, const wxString &exe, int icoNum)
Definition:
associations.cpp:146
ManageAssocsDialog::list
wxCheckListBox * list
Definition:
associations.h:58
wxCheckListBox
ipc.h
Associations::ClearAll
void ClearAll()
Definition:
associations.cpp:122
registry.h
Associations::DoCheckAssociation
bool DoCheckAssociation(const wxString &ext, const wxString &descr, const wxString &exe, int icoNum)
Associations::Assoc
Definition:
associations.h:32
wxWindow
Associations::CountAssocs
unsigned int CountAssocs()
Definition:
associations.cpp:79
AskAssocDialog
Definition:
associations.h:75
Generated by
1.8.13