~ubuntu-branches/ubuntu/raring/codeblocks/raring-proposed

« back to all changes in this revision

Viewing changes to src/plugins/contrib/codesnippets/codesnippetsevent.h

  • Committer: Bazaar Package Importer
  • Author(s): Cosme Domínguez Díaz
  • Date: 2010-08-09 04:38:38 UTC
  • mfrom: (1.1.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20100809043838-a59ygguym4eg0jgw
Tags: 10.05-0ubuntu1
* New upstream release. Closes (LP: #322350)
 - Switch to dpkg-source 3.0 (quilt) format
 - Remove unneeded README.source
 - Add debian/get-source-orig script that removes all
   Windows prebuilt binaries
* Bump Standards-Version to 3.9.1
 - Stop shipping *.la files
* debian/control
 - Add cdbs package as Build-Depend
 - Add libbz2-dev and zlib1g-dev packages as
   Build-Depends (needed by libhelp_plugin.so)
 - Remove dpatch package of Build-Depends
 - Add codeblocks-contrib-debug package
 - Split architecture-independent files of codeblocks
   package in codeblocks-common package
* debian/rules
 - Switch to CDBS rules system
 - Add parallel build support
 - Add a call to debian/get-source-orig script
 - Use lzma compression (saves 23,5 MB of free space)
* debian/patches
 - Refresh 01_codeblocks_plugin_path
 - Add 02_no_Makefiles_in_debian_dir to remove any link
   in codeblocks build system to deleted Makefiles of debian directory
 - Drop 02_ftbfs_gcc44 and 03_ftbfs_glib221 (merged in upstream)
* debian/watch
 - Update to use the new host (berlios.de)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************
 
2
 * Name:      CodeSnippetsEvent
 
3
 *
 
4
 * Purpose:   This class implements the events sent by/for a
 
5
 *            CodeSnippets request to the
 
6
 *            CodeSnippets Manager to request services such as
 
7
 *            Tree item focus and/or editing services.
 
8
 *            wxCommandEvent m_id contains a code snippets id.
 
9
 *
 
10
 * Author:    Pecan
 
11
 * Created:   2008/4/01
 
12
 * Copyright: Pecan
 
13
 * License:   GPL
 
14
 **************************************************************/
 
15
#ifndef CODESNIPPETS_EVENT_H
 
16
#define CODESNIPPETS_EVENT_H
 
17
 
 
18
#include <wx/event.h>
 
19
 
 
20
// ----------------------------------------------------------------------------
 
21
class CodeSnippetsEvent : public wxCommandEvent
 
22
// ----------------------------------------------------------------------------
 
23
{
 
24
public:
 
25
        /** Constructor. */
 
26
        CodeSnippetsEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
 
27
 
 
28
        /** Copy constructor. */
 
29
        CodeSnippetsEvent( const CodeSnippetsEvent& event);
 
30
 
 
31
        /** Destructor. */
 
32
        ~CodeSnippetsEvent();
 
33
 
 
34
        virtual wxEvent* Clone() const { return new CodeSnippetsEvent(*this);}
 
35
 
 
36
        DECLARE_DYNAMIC_CLASS(CodeSnippetsEvent);
 
37
 
 
38
        int      GetSnippetID() const {return m_SnippetID;}
 
39
        void     SetSnippetID( const int itemid ) {m_SnippetID = itemid;}
 
40
        wxString GetSnippetString() const {return m_SnippetString;}
 
41
        void     SetSnippetString( const wxString string ) {m_SnippetString = string;}
 
42
        wxString GetEventTypeLabel() const {return m_EventTypeLabel;}
 
43
    bool     PostCodeSnippetsEvent(const CodeSnippetsEvent& event);
 
44
    bool     ProcessCodeSnippetsEvent(const CodeSnippetsEvent& event);
 
45
 
 
46
private:
 
47
        int       m_SnippetID;
 
48
        wxString  m_SnippetString;
 
49
        wxString  m_EventTypeLabel;
 
50
};
 
51
 
 
52
typedef void (wxEvtHandler::*CodeSnippetsEventFunction)(CodeSnippetsEvent&);
 
53
 
 
54
BEGIN_DECLARE_EVENT_TYPES()
 
55
        DECLARE_EXPORTED_EVENT_TYPE(WXEXPORT, wxEVT_CODESNIPPETS_SELECT, wxID_ANY)
 
56
        DECLARE_EXPORTED_EVENT_TYPE(WXEXPORT, wxEVT_CODESNIPPETS_EDIT, wxID_ANY)
 
57
        DECLARE_EXPORTED_EVENT_TYPE(WXEXPORT, wxEVT_CODESNIPPETS_NEW_INDEX, wxID_ANY)
 
58
        DECLARE_EXPORTED_EVENT_TYPE(WXEXPORT, wxEVT_CODESNIPPETS_GETFILELINKS, wxID_ANY)
 
59
END_DECLARE_EVENT_TYPES()
 
60
 
 
61
#define EVT_CODESNIPPETS_SELECT(id, fn) \
 
62
        DECLARE_EVENT_TABLE_ENTRY(wxEVT_CODESNIPPETS_SELECT, id, -1, \
 
63
        (wxObjectEventFunction)(wxEventFunction)(wxCommandEventFunction) (CodeSnippetsEventFunction) & fn,(wxObject *) NULL ),
 
64
 
 
65
#define EVT_CODESNIPPETS_EDIT(id, fn) \
 
66
        DECLARE_EVENT_TABLE_ENTRY(wxEVT_CODESNIPPETS_EDIT, id, -1, \
 
67
        (wxObjectEventFunction)(wxEventFunction)(wxCommandEventFunction) (CodeSnippetsEventFunction) & fn,(wxObject *) NULL ),
 
68
 
 
69
#define EVT_CODESNIPPETS_NEW_INDEX(id, fn) \
 
70
        DECLARE_EVENT_TABLE_ENTRY(wxEVT_CODESNIPPETS_NEW_INDEX, id, -1, \
 
71
        (wxObjectEventFunction)(wxEventFunction)(wxCommandEventFunction) (CodeSnippetsEventFunction) & fn,(wxObject *) NULL ),
 
72
 
 
73
#define EVT_CODESNIPPETS_GETFILELINKS(id, fn) \
 
74
        DECLARE_EVENT_TABLE_ENTRY(wxEVT_CODESNIPPETS_GETFILELINKS, id, -1, \
 
75
        (wxObjectEventFunction)(wxEventFunction)(wxCommandEventFunction) (CodeSnippetsEventFunction) & fn,(wxObject *) NULL ),
 
76
 
 
77
#endif // CODESNIPPETS_EVENT_H
 
78
 
 
79