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

« back to all changes in this revision

Viewing changes to src/sdk/wxscintilla/src/scintilla/src/ContractionState.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
1
// Scintilla source code edit control
2
2
/** @file ContractionState.h
3
 
 ** Manages visibility of lines for folding.
 
3
 ** Manages visibility of lines for folding and wrapping.
4
4
 **/
5
 
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
 
5
// Copyright 1998-2007 by Neil Hodgson <neilh@scintilla.org>
6
6
// The License.txt file describes the conditions under which this software may be distributed.
7
7
 
8
8
#ifndef CONTRACTIONSTATE_H
9
9
#define CONTRACTIONSTATE_H
10
10
 
11
 
/**
12
 
 */
13
 
class OneLine {
14
 
public:
15
 
        int displayLine;        ///< Position within set of visible lines
16
 
        //int docLine;          ///< Inverse of @a displayLine
17
 
        int height;     ///< Number of display lines needed to show all of the line
18
 
        bool visible;
19
 
        bool expanded;
 
11
/* C::B begin */
 
12
#include "RunStyles.h"
 
13
/* C::B end */
20
14
 
21
 
        OneLine();
22
 
        virtual ~OneLine() {}
23
 
};
 
15
#ifdef SCI_NAMESPACE
 
16
namespace Scintilla {
 
17
#endif
24
18
 
25
19
/**
26
20
 */
27
21
class ContractionState {
28
 
        void Grow(int sizeNew);
29
 
        enum { growSize = 4000 };
30
 
        int linesInDoc;
31
 
        mutable int linesInDisplay;
32
 
        mutable OneLine *lines;
33
 
        int size;
34
 
        mutable int *docLines;
35
 
        mutable int sizeDocLines;
36
 
        mutable bool valid;
37
 
        void MakeValid() const;
 
22
        // These contain 1 element for every document line.
 
23
        RunStyles *visible;
 
24
        RunStyles *expanded;
 
25
        RunStyles *heights;
 
26
        Partitioning *displayLines;
 
27
        int linesInDocument;
 
28
 
 
29
        void EnsureData();
 
30
 
 
31
        bool OneToOne() const {
 
32
                // True when each document line is exactly one display line so need for
 
33
                // complex data structures.
 
34
                return visible == 0;
 
35
        }
38
36
 
39
37
public:
40
38
        ContractionState();
47
45
        int DisplayFromDoc(int lineDoc) const;
48
46
        int DocFromDisplay(int lineDisplay) const;
49
47
 
 
48
        void InsertLine(int lineDoc);
50
49
        void InsertLines(int lineDoc, int lineCount);
 
50
        void DeleteLine(int lineDoc);
51
51
        void DeleteLines(int lineDoc, int lineCount);
52
52
 
53
53
        bool GetVisible(int lineDoc) const;
60
60
        bool SetHeight(int lineDoc, int height);
61
61
 
62
62
        void ShowAll();
 
63
        void Check() const;
63
64
};
64
65
 
 
66
#ifdef SCI_NAMESPACE
 
67
}
 
68
#endif
 
69
 
65
70
#endif