]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/textctrl.h
many fixes to wxTextCrtl, wxTreeCrtl, wxListBox,
[wxWidgets.git] / include / wx / gtk1 / textctrl.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: textctrl.h
3// Purpose:
4// Author: Robert Roebling
5// Created: 01/02/97
6// Id:
7// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11
12#ifndef __GTKTEXTCTRLH__
13#define __GTKTEXTCTRLH__
14
15#ifdef __GNUG__
16#pragma interface
17#endif
18
19#include "wx/defs.h"
20#include "wx/object.h"
21#include "wx/string.h"
22#include "wx/control.h"
23
24#if USE_IOSTREAMH
25#include <iostream.h>
26#else
27#include <iostream>
28#endif
29
30//-----------------------------------------------------------------------------
31// classes
32//-----------------------------------------------------------------------------
33
34class wxTextCtrl;
35
36//-----------------------------------------------------------------------------
37// global data
38//-----------------------------------------------------------------------------
39
40extern const char *wxTextCtrlNameStr;
41
42//-----------------------------------------------------------------------------
43// wxTextCtrl
44//-----------------------------------------------------------------------------
45
46class wxTextCtrl: public wxControl, public streambuf
47{
48 DECLARE_DYNAMIC_CLASS(wxTextCtrl);
49
50 public:
51
52 wxTextCtrl(void);
debe6624
JS
53 wxTextCtrl( wxWindow *parent, wxWindowID id, const wxString &value = "",
54 const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
55 int style = 0, const wxString &name = wxTextCtrlNameStr );
56 bool Create( wxWindow *parent, wxWindowID id, const wxString &value = "",
57 const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
58 int style = 0, const wxString &name = wxTextCtrlNameStr );
c801d85f
KB
59 wxString GetValue(void) const;
60 void SetValue( const wxString &value );
61 void WriteText( const wxString &text );
112892b9 62
c801d85f
KB
63 bool LoadFile( const wxString &file );
64 bool SaveFile( const wxString &file );
c801d85f 65 bool IsModified(void);
112892b9
RR
66 void DiscardEdits(void);
67/*
debe6624 68 wxString GetLineText( long lineNo ) const;
c801d85f 69 void OnDropFiles( wxDropFilesEvent &event );
debe6624
JS
70 long PositionToXY( long pos, long *x, long *y ) const;
71 long XYToPosition( long x, long y );
c801d85f
KB
72 int GetNumberOfLines(void);
73*/
debe6624 74 virtual void SetInsertionPoint( long pos );
c801d85f 75 virtual void SetInsertionPointEnd(void);
debe6624
JS
76 virtual void SetEditable( bool editable );
77 virtual void SetSelection( long from, long to );
78 void ShowPosition( long pos );
c801d85f
KB
79 virtual long GetInsertionPoint(void) const;
80 virtual long GetLastPosition(void) const;
debe6624
JS
81 virtual void Remove( long from, long to );
82 virtual void Replace( long from, long to, const wxString &value );
c801d85f
KB
83 void Cut(void);
84 void Copy(void);
85 void Paste(void);
86 void Delete(void);
87
88 void OnChar( wxKeyEvent &event );
89
90 int overflow(int i);
91 int sync(void);
92 int underflow(void);
93
94 wxTextCtrl& operator<<(const wxString& s);
debe6624
JS
95 wxTextCtrl& operator<<(int i);
96 wxTextCtrl& operator<<(long i);
97 wxTextCtrl& operator<<(float f);
98 wxTextCtrl& operator<<(double d);
c801d85f 99 wxTextCtrl& operator<<(const char c);
112892b9
RR
100
101 public:
102
103 bool m_modified;
c801d85f
KB
104
105 DECLARE_EVENT_TABLE()
106
107};
108
109#endif // __GTKTEXTCTRLH__
110
111