1 // Copyright (C) 2007-2024 OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // File : SalomePyQt.sip
20 // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
25 %Import QtCore/QtCoremod.sip
26 %Import QtGui/QtGuimod.sip
28 %Import QtWidgets/QtWidgetsmod.sip
31 class PyEditor_Settings
34 #include <PyEditor_Settings.h>
40 void setHighlightCurrentLine( bool );
41 bool highlightCurrentLine() const;
43 void setTextWrapping( bool );
44 bool textWrapping() const;
46 void setCenterCursorOnScroll( bool );
47 bool centerCursorOnScroll() const;
49 void setLineNumberArea( bool );
50 bool lineNumberArea() const;
52 void setVerticalEdge( bool );
53 bool verticalEdge() const;
55 void setNumberColumns( int );
56 int numberColumns() const;
58 void setTabSpaceVisible( bool );
59 bool tabSpaceVisible() const;
61 void setTabSize( int );
64 void setFont( const QFont& );
67 void setCompletionPolicy( int );
68 int completionPolicy() const;
71 class PyEditor_Editor : QPlainTextEdit
74 #include <PyEditor_Editor.h>
78 explicit PyEditor_Editor( QWidget* /TransferThis/ = 0 );
79 virtual ~PyEditor_Editor();
81 void setSettings( const PyEditor_Settings& );
82 const PyEditor_Settings& settings() const;
85 QStringList keywords() const;
86 void appendKeywords( const QStringList&, int, const QColor& = QColor() );
87 void removeKeywords( const QStringList& );
90 void deleteSelected();
91 void append( const QString& );
92 void setText( const QString& text );
93 void setCurrentLine( int );
96 virtual void keyPressEvent( QKeyEvent* );
97 virtual void resizeEvent( QResizeEvent* );
98 virtual void paintEvent( QPaintEvent* );
101 PyEditor_Editor( const PyEditor_Editor& );
102 PyEditor_Editor& operator=( const PyEditor_Editor& );
105 class PyEditor_FindTool : public QWidget
108 #include <PyEditor_FindTool.h>
112 explicit PyEditor_FindTool( PyEditor_Editor* /TransferThis/, QWidget* /TransferThis/ = 0 );
116 void activateReplace();
119 PyEditor_FindTool( const PyEditor_FindTool& );
120 PyEditor_FindTool& operator=( const PyEditor_FindTool& );
123 class PyEditor_Widget : public QWidget
126 #include <PyEditor_Widget.h>
130 explicit PyEditor_Widget( QWidget* /TransferThis/ = 0 );
132 PyEditor_Editor* editor();
133 PyEditor_FindTool* findTool();
135 void setSettings( const PyEditor_Settings& );
136 const PyEditor_Settings& settings() const;
140 QString text() const;
142 QStringList keywords() const;
143 void appendKeywords( const QStringList&, int, const QColor& = QColor() );
144 void removeKeywords( const QStringList& );
146 int completionPolicy() const;
147 void setCompletionPolicy( int );
158 void deleteSelected();
162 void setModified( bool );
164 void setText( const QString& );
166 void setCurrentLine( int );
169 void modificationChanged( bool );
170 void undoAvailable( bool );
171 void redoAvailable( bool );
172 void copyAvailable( bool );
173 void selectionChanged();
175 void cursorPositionChanged();
178 PyEditor_Widget( const PyEditor_Widget& );
179 PyEditor_Widget& operator=( const PyEditor_Widget& );