summaryrefslogtreecommitdiffstats
path: root/sip/qt/qmultilinedit.sip
blob: 4b3b4f7f73b099e96d1999b4b960b297b9ce62fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
// This is the SIP interface definition for TQMultiLineEdit.
//
// Copyright (c) 2007
// 	Riverbank Computing Limited <info@riverbankcomputing.co.uk>
// 
// This file is part of PyTQt.
// 
// This copy of PyTQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
// 
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
// details.
// 
// You should have received a copy of the GNU General Public License along with
// PyTQt; see the file LICENSE.  If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


%ExportedDoc
<Sect2><Title>TQMultiLineEdit</Title>
<FuncSynopsis>
        <FuncDef>void <Function>cursorPosition</Function> const</FuncDef>
        <ParamDef>int *<Parameter>line</Parameter></ParamDef>
        <ParamDef>int *<Parameter>col</Parameter></ParamDef>
</FuncSynopsis>
<Para>
This takes no parameters and returns a tuple of the <Literal>line</Literal> and
<Literal>col</Literal> values.  (TQt v1.x, TQt v2.x)
</Para>

<FuncSynopsis>
        <FuncDef>virtual void <Function>del</Function></FuncDef>
        <ParamDef></ParamDef>
</FuncSynopsis>
<Para>
This has been renamed <Literal>delChar</Literal> in Python.  (TQt v1.x, TQt v2.x)
</Para>

<FuncSynopsis>
        <FuncDef>void <Function>getCursorPosition</Function> const</FuncDef>
        <ParamDef>int *<Parameter>line</Parameter></ParamDef>
        <ParamDef>int *<Parameter>col</Parameter></ParamDef>
</FuncSynopsis>
<Para>
This takes no parameters and returns a tuple of the <Literal>line</Literal> and
<Literal>col</Literal> values.  (TQt v1.x, TQt v2.x)
</Para>

<FuncSynopsis>
        <FuncDef>bool <Function>getMarkedRegion</Function></FuncDef>
        <ParamDef>int *<Parameter>line1</Parameter></ParamDef>
        <ParamDef>int *<Parameter>col1</Parameter></ParamDef>
        <ParamDef>int *<Parameter>line2</Parameter></ParamDef>
        <ParamDef>int *<Parameter>col2</Parameter></ParamDef>
</FuncSynopsis>
<Para>
This takes no parameters and returns a tuple of the bool result and the
<Literal>line1</Literal>, <Literal>col1</Literal>, <Literal>line2</Literal> and
<Literal>col2</Literal> values.
</Para>
</Sect2>
%End


class TQMultiLineEdit : TQTextEdit
{
%TypeHeaderCode
#include <tqmultilineedit.h>
%End

public:
	TQMultiLineEdit(TQWidget * /TransferThis/ = 0,const char * = 0);

	TQString textLine(int) const;
	int numLines() const;

	virtual void insertLine(const TQString &,int = -1);
	virtual void insertAt(const TQString &,int,int);
	virtual void insertAt(const TQString &,int,int,bool);
	virtual void removeLine(int);

	virtual void setCursorPosition(int,int);
	virtual void setCursorPosition(int,int,bool);
	bool atBeginning() const;
	bool atEnd() const;

	void setAlignment(int);
	int alignment() const;

	void setEdited(bool);
	bool edited() const;

	bool hasMarkedText() const;
	TQString markedText() const;

	void cursorWordForward(bool);
	void cursorWordBackward(bool);

	bool autoUpdate() const;
	virtual void setAutoUpdate(bool);

	int totalWidth() const;
	int totalHeight() const;

	int maxLines() const;
	void setMaxLines(int);

public slots:
	void deselect();

protected:
	TQPoint cursorPoint() const;
	virtual void insertAndMark(const TQString &,bool);
	virtual void newLine();
	virtual void killLine();
	virtual void pageUp(bool = 0);
	virtual void pageDown(bool = 0);
	virtual void cursorLeft(bool = 0,bool = 1);
	virtual void cursorRight(bool = 0,bool = 1);
	virtual void cursorUp(bool = 0);
	virtual void cursorDown(bool = 0);
	virtual void backspace();
	virtual void home(bool = 0);
	virtual void end(bool = 0);
	bool getMarkedRegion(int *,int *,int *,int *) const;
	int lineLength(int) const;

private:
	TQMultiLineEdit(const TQMultiLineEdit &);
};