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

« back to all changes in this revision

Viewing changes to src/sdk/wxscintilla/samples/test/edit.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
 
// File:        edit.h
3
 
// Purpose:     wxScintilla test module
4
 
// Maintainer:  Otto Wyss
5
 
// Created:     2003-09-01
6
 
// RCS-ID:      $Id: edit.h 1960 2006-02-07 13:36:51Z thomasdenk $
7
 
// Copyright:   (c) 2004 wxCode
8
 
// Licence:     wxWindows
9
 
//////////////////////////////////////////////////////////////////////////////
10
 
 
11
 
#ifndef _EDIT_H_
12
 
#define _EDIT_H_
13
 
 
14
 
//----------------------------------------------------------------------------
15
 
// informations
16
 
//----------------------------------------------------------------------------
17
 
 
18
 
 
19
 
//----------------------------------------------------------------------------
20
 
// headers
21
 
//----------------------------------------------------------------------------
22
 
 
23
 
//! wxWindows headers
24
 
 
25
 
//! wxScintilla headers
26
 
#include <wx/wxscintilla.h>  // scintilla edit control
27
 
 
28
 
//! application headers
29
 
#include "prefs.h"       // preferences
30
 
 
31
 
 
32
 
//============================================================================
33
 
// declarations
34
 
//============================================================================
35
 
 
36
 
class EditPrint;
37
 
class EditProperties;
38
 
 
39
 
 
40
 
//----------------------------------------------------------------------------
41
 
//! Edit
42
 
class Edit: public wxScintilla {
43
 
    friend class EditProperties;
44
 
    friend class EditPrint;
45
 
 
46
 
public:
47
 
    //! constructor
48
 
    Edit (wxWindow *parent, wxWindowID id = -1,
49
 
          const wxPoint &pos = wxDefaultPosition,
50
 
          const wxSize &size = wxDefaultSize,
51
 
          long style = wxSUNKEN_BORDER|wxVSCROLL
52
 
         );
53
 
 
54
 
    //! destructor
55
 
    ~Edit ();
56
 
 
57
 
    // event handlers
58
 
    // common
59
 
    void OnSize( wxSizeEvent &event );
60
 
    // edit
61
 
    void OnEditRedo (wxCommandEvent &event);
62
 
    void OnEditUndo (wxCommandEvent &event);
63
 
    void OnEditClear (wxCommandEvent &event);
64
 
    void OnEditCut (wxCommandEvent &event);
65
 
    void OnEditCopy (wxCommandEvent &event);
66
 
    void OnEditPaste (wxCommandEvent &event);
67
 
    // find
68
 
    void OnFind (wxCommandEvent &event);
69
 
    void OnFindNext (wxCommandEvent &event);
70
 
    void OnReplace (wxCommandEvent &event);
71
 
    void OnReplaceNext (wxCommandEvent &event);
72
 
    void OnBraceMatch (wxCommandEvent &event);
73
 
    void OnGoto (wxCommandEvent &event);
74
 
    void OnEditIndentInc (wxCommandEvent &event);
75
 
    void OnEditIndentRed (wxCommandEvent &event);
76
 
    void OnEditSelectAll (wxCommandEvent &event);
77
 
    void OnEditSelectLine (wxCommandEvent &event);
78
 
    //! view
79
 
    void OnHilightLang (wxCommandEvent &event);
80
 
    void OnDisplayEOL (wxCommandEvent &event);
81
 
    void OnIndentGuide (wxCommandEvent &event);
82
 
    void OnLineNumber (wxCommandEvent &event);
83
 
    void OnLongLineOn (wxCommandEvent &event);
84
 
    void OnWhiteSpace (wxCommandEvent &event);
85
 
    void OnFoldToggle (wxCommandEvent &event);
86
 
    void OnSetOverType (wxCommandEvent &event);
87
 
    void OnSetReadOnly (wxCommandEvent &event);
88
 
    void OnWrapmodeOn (wxCommandEvent &event);
89
 
    void OnUseCharset (wxCommandEvent &event);
90
 
    //! extra
91
 
    void OnChangeCase (wxCommandEvent &event);
92
 
    void OnConvertEOL (wxCommandEvent &event);
93
 
    // styled text
94
 
    void OnMarginClick (wxScintillaEvent &event);
95
 
    void OnCharAdded  (wxScintillaEvent &event);
96
 
 
97
 
    //! language/lexer
98
 
    wxString DeterminePrefs (const wxString &filename);
99
 
    bool InitializePrefs (const wxString &filename);
100
 
    bool UserSettings (const wxString &filename);
101
 
    LanguageInfo const* GetLanguageInfo () {return m_language;};
102
 
 
103
 
    //! load/save file
104
 
    bool LoadFile ();
105
 
    bool LoadFile (const wxString &filename);
106
 
    bool SaveFile ();
107
 
    bool SaveFile (const wxString &filename);
108
 
    bool Modified ();
109
 
    wxString GetFilename () {return m_filename;};
110
 
    void SetFilename (const wxString &filename) {m_filename = filename;};
111
 
 
112
 
private:
113
 
    // file
114
 
    wxString m_filename;
115
 
 
116
 
    // lanugage properties
117
 
    LanguageInfo const* m_language;
118
 
 
119
 
    // margin variables
120
 
    int m_LineNrID;
121
 
    int m_LineNrMargin;
122
 
    int m_FoldingID;
123
 
    int m_FoldingMargin;
124
 
    int m_DividerID;
125
 
 
126
 
    DECLARE_EVENT_TABLE()
127
 
};
128
 
 
129
 
//----------------------------------------------------------------------------
130
 
//! EditProperties
131
 
class EditProperties: public wxDialog {
132
 
 
133
 
public:
134
 
 
135
 
    //! constructor
136
 
    EditProperties (Edit *edit, long style = 0);
137
 
 
138
 
private:
139
 
 
140
 
};
141
 
 
142
 
//----------------------------------------------------------------------------
143
 
//! EditPrint
144
 
class EditPrint: public wxPrintout {
145
 
 
146
 
public:
147
 
 
148
 
    //! constructor
149
 
    EditPrint (Edit *edit, wxChar *title = _T(""));
150
 
 
151
 
    //! event handlers
152
 
    bool OnPrintPage (int page);
153
 
    bool OnBeginDocument (int startPage, int endPage);
154
 
 
155
 
    //! print functions
156
 
    bool HasPage (int page);
157
 
    void GetPageInfo (int *minPage, int *maxPage, int *selPageFrom, int *selPageTo);
158
 
 
159
 
private:
160
 
    Edit *m_edit;
161
 
    int m_printed;
162
 
    wxRect m_pageRect;
163
 
    wxRect m_printRect;
164
 
 
165
 
    bool PrintScaling (wxDC *dc);
166
 
};
167
 
 
168
 
#endif // _EDIT_H_
169