Compare commits

..

93 Commits

Author SHA1 Message Date
Bryan Petty
a02fc50b3e This commit was manufactured by cvs2svn to create tag 'LAST_GOOD'.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/LAST_GOOD@311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-19 20:46:35 +00:00
Vadim Zeitlin
86bb7d4825 infinite loop in wxNavigationKeyEvent processing fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-19 20:46:35 +00:00
Vadim Zeitlin
ae29de8326 MSWGetDlgCode() behaviour changed to allow both TAB navigation in the
dialogs, pressing Enter to activate default button and processing Enter
by the text control itself.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-19 20:45:51 +00:00
Julian Smart
a93ca20183 Renamed a couple more samples/controls files; fixed wxSplitterWindow cursors
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-19 20:09:44 +00:00
Karsten Ballüder
26cf69fe72 fixed the ps dialog but doesn't all work yet
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-19 17:39:07 +00:00
Julian Smart
637f467a06 wxDocManager gets the only view if none other specified as the current view;
added ProcessEvent so views get their events processed properly.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-18 22:04:25 +00:00
Julian Smart
0fc1a7137c Added revamped Object Graphics Library (for node/arc diagrams).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-18 21:57:52 +00:00
Vadim Zeitlin
0f7549d594 a couple of functions added (GetNumberOfGroups/Entries, ExpandEnvStrings),
some global functions renamed to start with "wx"


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-18 21:47:45 +00:00
Vadim Zeitlin
82cf4761e1 small bug fixes + a couple of new functions added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-18 21:44:54 +00:00
Vadim Zeitlin
9fbd8b8d61 several bugs fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-18 21:15:37 +00:00
Guilhem Lavaux
cf5f9c9c3e wxFrame: OnSize() has a SEGV if wxFrame has no child. Fixed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-18 10:44:31 +00:00
Robert Roebling
0d73e5a104 ODBC compile (and link) fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-18 10:15:35 +00:00
Robert Roebling
1a6944fd74 added ODBC support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@299 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-18 00:57:32 +00:00
Vadim Zeitlin
c83d505a20 compile without STRICT fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-17 22:34:15 +00:00
Vadim Zeitlin
c7f3b78bac corrected (after wxTString untimely death) and expanded
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-17 21:21:02 +00:00
Vadim Zeitlin
3aadbb82d9 the very last traces of wxTString removed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-17 21:13:13 +00:00
Julian Smart
11ed4f79aa Bug fix to scrolwin.cpp (position not set in SetScrollbars); redundant variable
in wxGrid removed


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-17 21:03:05 +00:00
Vadim Zeitlin
99d270120e don't set focus to [ok] in text entry dialog (leave the text zone have it)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-17 21:01:47 +00:00
Vadim Zeitlin
7502ba2975 last traces of wxTString removed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-17 21:00:11 +00:00
Vadim Zeitlin
3168a13f90 correct (working) version of wxString
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-17 20:58:33 +00:00
Vadim Zeitlin
a1530845c9 wxTString removed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-17 20:52:40 +00:00
Vadim Zeitlin
6b95b20d03 correct (working) version of wxString
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-17 20:51:36 +00:00
Vadim Zeitlin
36af0bc423 another "const" added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-17 13:07:33 +00:00
Vadim Zeitlin
85ccdcce1c some "const"s added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-17 12:44:13 +00:00
Karsten Ballüder
e14dccff1c fixed, latex now works for manual.tex and referenc.tex, but
referenc.tex fails with index


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-17 12:34:50 +00:00
Julian Smart
d6a1743b56 Some Borland/GnuWin32 fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-17 11:10:38 +00:00
Karsten Ballüder
18a2fa3715 fixed underline for drawing text, as suggested by Chris Breeze
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-17 10:06:26 +00:00
Julian Smart
c4e7c2aa58 Added STRICT corrections.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-17 09:32:24 +00:00
Vadim Zeitlin
e99c304810 fixed compilation problems under Windows
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-17 08:18:57 +00:00
Robin Dunn
3848ffef9f fixed a missing backslash
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-17 03:35:20 +00:00
Vadim Zeitlin
f5ae044937 wxFileConfig uses sorted arrays (big performance improvement)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-16 17:30:39 +00:00
Vadim Zeitlin
3bfa440288 added sorted arrays: they automatically sort items on insertion (using user
provided compare function) and binary search in Index(). Using them in
situations where Index() performance is important brings 30%-40% performance
boost.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-16 17:29:46 +00:00
Julian Smart
400735a8fa Cured SetString/GetSelection interaction; incorporated Chris's changes to wxDC:Blit
for printer DCs.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-16 08:34:29 +00:00
Robin Dunn
1eb20d4a08 Inserted an else that seemed to be missing. (My RadioBox crashed
without it...)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-16 06:47:27 +00:00
Guilhem Lavaux
e49f47aa77 wxStream: wxInputStream and wxOutputStream don't inherit from wxObject anymore.
Removed DECLARE* and IMPLEMENT*
filefn.h: added #include "wx/list.h" to define wxStringList


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-15 18:40:37 +00:00
Vadim Zeitlin
ba7f9a90b4 speed optimizations: some functions now use wxString::Alloc, wxTextFile::Read
uses a buffer to read data (instead of reading it one char at a time)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-15 17:14:06 +00:00
Vadim Zeitlin
dd1eaa89dd optimizations: more functions made inline, added Alloc()/Shrink() function for
more precise control over string's memory


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@275 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-15 17:10:23 +00:00
Karsten Ballüder
2ab889ff7b added gauge.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-15 14:38:57 +00:00
Karsten Ballüder
5a8c6c9adb fixed SetRange/GetValue
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-15 14:37:42 +00:00
Karsten Ballüder
24e5e6fcb4 fixed wxGTK copyright
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-15 12:02:40 +00:00
Karsten Ballüder
b4c05cda99 On Robert's request I have added the html-version of my wxQt proposal.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-15 12:00:42 +00:00
Vadim Zeitlin
45ea509a21 common constants (wxSeekMode) and types (off_t) to wxFile and wxStream are
now defined in filefn.h included by both file.h and stream.h


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-14 22:15:29 +00:00
Vadim Zeitlin
eda3efe2f8 off_t #define'd as _off_t for VC++ (it's not a standard type)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-14 22:08:59 +00:00
Vadim Zeitlin
30a5be975d GetTempFileName used in wxTempFile now instead of tmpnam
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-14 21:59:27 +00:00
Vadim Zeitlin
0ce2baa5e6 ExpandEnvVars was eating backslashes - no more.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@267 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-14 21:57:24 +00:00
Vadim Zeitlin
3826db3ef5 added wxSplitFile() to decompose a file name into path + name + ext
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-14 21:55:47 +00:00
Vadim Zeitlin
92abb45d0a 1) added wxSplitFile() to decompose a file name into path + name + ext
2) added a macro wxARE_FILENAMES_CASE_SENSITIVE which is either 1 or 0
   (for usage with wxString::IsSameAs)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-14 21:55:17 +00:00
Guilhem Lavaux
0cd9bfe8da * wxMemory*Stream link problem fix.
* wxData*Stream update.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-14 16:35:50 +00:00
Guilhem Lavaux
79c3e0e1ae * wxStream: I've rewritten the inheritance
* added wxZlib*Stream
* updated makefiles and data.cpp
* modified a bit wxFile so I can use it in wxFile*Stream


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-14 12:06:50 +00:00
Robert Roebling
33d0b396b2 resize mdi and notebook client
bitmap resizing (used in imagelist)
draw spline bug


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-13 23:30:59 +00:00
Julian Smart
d29d303b1c In splitter sample, forwarded OnIdle events to wxFrame, else UI updates don't
work. Removed compatibility function from docview.h.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-13 20:11:21 +00:00
Robert Roebling
0180d5daae memdc and bitmap fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-13 17:00:29 +00:00
Vadim Zeitlin
5a8c929eb4 constraints for notebook pages work (again)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-13 16:57:43 +00:00
Karsten Ballüder
85504caca9 fixed DEBUG
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@258 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-13 15:46:01 +00:00
Karsten Ballüder
c6cdbc3d75 Changed #ifdef DEBUG to #ifdef __WXDEBUG__
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-13 14:11:22 +00:00
Karsten Ballüder
70bb5dba34 Quick fix to avoid unnecessary compiler warnings from duplicate __WXDEBUG__ defines.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-13 12:47:02 +00:00
Karsten Ballüder
4acbf24597 Configure now adds -D__WXDEBUG__ to the compiler switches if run with
--with-debug_flag.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-13 12:45:47 +00:00
Karsten Ballüder
f0b078077d Fixed that stupid stream problem.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-13 10:01:29 +00:00
Julian Smart
db138a4c2a Removed streams from VC++ makefile for now; corrected typo in log.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-13 09:15:56 +00:00
Karsten Ballüder
ddfc206782 uses wxString again (std::string optional)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-13 08:48:38 +00:00
Vadim Zeitlin
7d7fb17e1d GetTextExtent checks that passed pointers are not NULL
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-12 23:23:11 +00:00
Vadim Zeitlin
27c9fe7554 wxLogDebug/Trace in release mode now don't give compiler warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-12 23:07:22 +00:00
Vadim Zeitlin
b5c3b53817 constraints handling for notebook pages improved
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-12 22:59:00 +00:00
Vadim Zeitlin
e15e548b50 wxFILE_MUST_EXIST added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-12 22:57:42 +00:00
Vadim Zeitlin
db8b79634e wxWindow::OnSize() removed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-12 22:52:14 +00:00
Vadim Zeitlin
092bddef5a 1) separate expand/collapse event
2) separate Expand/Collapse/ToggleItem() functions
3) IsItemExpanded() added


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@246 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-12 22:50:32 +00:00
Vadim Zeitlin
5475b96085 constraints handling for the notebook pages fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-12 22:47:09 +00:00
Vadim Zeitlin
a8e50c86a4 defined wxFILE_MUST_EXIST flag
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@244 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-12 22:46:10 +00:00
Vadim Zeitlin
f04f399187 wxGetEmptyString() function added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@243 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-12 22:40:00 +00:00
Vadim Zeitlin
02ce7b722e 1. expand/collapse (and -ing variants) events are now separated
2. ExpandItem(action) can now be also called as ExpandItem(), CollapseItem()
   and ToggleItem()
3. several other minor changes (IsExpanded function added)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-12 22:25:34 +00:00
Vadim Zeitlin
abc7998686 added missing UngetWriteBuf() in wxString::insert
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-12 22:06:28 +00:00
Vadim Zeitlin
128aec1da4 memory leak plugged
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-12 22:05:16 +00:00
Vadim Zeitlin
cd70477bbd wxFrame::OnSize() slightly optimized (the behaviour is the same as before)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-12 21:55:31 +00:00
Vadim Zeitlin
d8329927ee wxWindow::OnSize() removed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@238 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-12 21:49:45 +00:00
Robert Roebling
219f895a27 stream compile fixes
bitmap, icon, imaglist work (broken)
notebook client resize fixed (ugly)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-12 20:06:59 +00:00
Guilhem Lavaux
3cacae09fa Added IMPLEMENT_CLASS, ... about wxStream classes (I hope I didn't make mistakes).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-12 15:36:53 +00:00
Guilhem Lavaux
32fc4afbb2 Ooops ! I've forgotten the include files.
mmstream.cpp => mstream.cpp


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-12 15:24:52 +00:00
Guilhem Lavaux
3d4c6a214a Added wxStream but I haven't tested them.
Modified wxDataStream.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-12 15:16:09 +00:00
Karsten Ballüder
23f641681f latest sources from M
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@233 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-12 15:02:44 +00:00
Julian Smart
4414cc1db8 Added wxTreeLayout for wxWindows 2.0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-12 09:21:16 +00:00
Julian Smart
ad3ad68e15 Added gtk.rsp, a 'response' file (listing of all wxGTK-specific files)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-12 09:17:14 +00:00
Julian Smart
3e1a3a402d Removed #pragmas in utils.cpp, corrected USE_(WX)DEBUG_CONTEXT,
added wx200gtk.zip creation in zipdist.bat.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-12 09:16:20 +00:00
Guilhem Lavaux
0f460a1d4b Deleted "#include <sched.h>".
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@229 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-11 14:51:58 +00:00
Robert Roebling
401ec7b639 event/leave events
scrollbar fix
listctrl fix


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@228 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-11 09:53:58 +00:00
Robert Roebling
4c6819972f tree control and dc::drawlines bug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-10 23:08:39 +00:00
Vadim Zeitlin
da7f8ac4dd wxWindow::OnSize() does _not_ call Layout() (it should only be done for
top-level windows)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-10 17:46:08 +00:00
Vadim Zeitlin
ed7a557b53 wxFrame::OnSize() calls Layout() if GetAutoLayout()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@225 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-10 17:45:38 +00:00
Karsten Ballüder
2049ba38ad Changed __GTK__, __WINDOWS__ and __MOTIF__ to __WXGTK__, __WXMSW__ and __WXMOTIF__
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-10 14:15:17 +00:00
Karsten Ballüder
7007fcfced Fixed implementation pragma to "utils.h"
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-10 13:34:20 +00:00
Karsten Ballüder
8c43d1c898 DEBUG -> WXDEBUG
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-10 12:06:03 +00:00
Karsten Ballüder
2216f571bf still fixing DEBUG macros
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-10 12:01:16 +00:00
Karsten Ballüder
54fe0dcf9a fixed another @DEBUG@
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@219 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-10 11:55:19 +00:00
Karsten Ballüder
b2aef89b7a Cleared up DEBUG define mess, defines are now called __WXDEBUG__ and WXDEBUG.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-10 11:14:17 +00:00
412 changed files with 16933 additions and 15223 deletions

56
distrib/msw/gtk.rsp Normal file
View File

@@ -0,0 +1,56 @@
install-sh
Makefile
template.mak
TODO.txt
docs/gtk/*.html
src/mkdirs
src/Makefile
src/Makefile.in
src/gtk/*.cpp
src/gtk/*.c
src/gtk/*.inc
src/gtk/*.xbm
src/gtk/setup/*.hin
src/gtk/setup/*.in
src/gtk/setup/rules/*
src/gtk/setup/rules/generic/*
src/gtk/setup/rules/linux/*
src/gdk_imlib/*.c
src/gdk_imlib/*.h
src/gdk_imlib/AUTHORS
src/gdk_imlib/AUDIT
src/gdk_imlib/COPYING.LIB
src/gdk_imlib/README
src/gdk_imlib/ChangeLog
install/gtk/*
misc/afm/*
misc/gs_afm/*
misc/imlib/*
user/Makefile
user/wxConvert/*.cpp
user/wxConvert/*.h
user/wxConvert/Makefile
user/wxConvert/Makefile.in
user/wxFile/*.cpp
user/wxFile/*.h
user/wxFile/Makefile
user/wxFile/Makefile.in
user/wxFile/*.xpm
user/wxTest/*.cpp
user/wxTest/*.h
user/wxTest/Makefile
user/wxTest/Makefile.in
user/wxTest/*.xpm
user/wxTest/*.png

View File

@@ -14,9 +14,9 @@ cd %1
echo Zipping...
zip32 -@ %2\wx200gen.zip < %1\distrib\msw\generic.rsp
zip32 -@ %2\wx200msw.zip < %1\distrib\msw\msw.rsp
zip32 -@ %2\wx200gtk.zip < %1\distrib\msw\gtk.rsp
zip32 -@ %2\wx200doc.zip < %1\distrib\msw\docsrc.rsp
rem zip32 -@ %2\wx200ps.zip < %1\distrib\msw\wx_ps.rsp
zip32 -@ %2\wx200hlp.zip < %1\distrib\msw\wx_hlp.rsp
zip32 -@ %2\wx200htm.zip < %1\distrib\msw\wx_html.rsp
zip32 -@ %2\wx200pdf.zip < %1\distrib\msw\wx_pdf.rsp

View File

@@ -50,7 +50,7 @@ $$\image{14cm;0cm}{wxclass.ps}$$
\input cursor.tex
\input database.tex
\input date.tex
\input datstream.tex
\input datstrm.tex
\input dc.tex
\input ddeclint.tex
\input ddeconn.tex
@@ -172,3 +172,8 @@ $$\image{14cm;0cm}{wxclass.ps}$$
\input function.tex
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "referenc"
%%% End:

View File

@@ -27,7 +27,7 @@ which is generated by a wxCheckBox control.}
which is generated by a wxChoice control.}
\twocolitem{{\bf EVT\_LISTBOX(id, func)}}{Process a wxEVT\_COMMAND\_LISTBOX\_SELECTED command,
which is generated by a wxListBox control.}
\twocolitem{{\bf EVT\_LISTBOX_DCLICK(id, func)}}{Process a wxEVT\_COMMAND\_LISTBOX\_DOUBLECLICKED command,
\twocolitem{{\bf EVT\_LISTBOX\_DCLICK(id, func)}}{Process a wxEVT\_COMMAND\_LISTBOX\_DOUBLECLICKED command,
which is generated by a wxListBox control.}
\twocolitem{{\bf EVT\_TEXT(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_UPDATED command,
which is generated by a wxTextCtrl control.}
@@ -177,3 +177,8 @@ Sets the {\bf m\_commandInt} member.
Sets the {\bf m\_commandString} member.
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "referenc"
%%% End:

View File

@@ -96,14 +96,19 @@ Writes the double {\it f} to the stream using the IEEE format.
\membersection{wxDataStream::WriteString}
\func{void}{wxDataStream::WriteString}{{\param const wxString& }{string}}
\func{void}{wxDataStream::WriteString}{{\param const wxString\& }{string}}
Writes {\it string} to the stream. Actually, this method writes the size of
the string before writing {\it string} itself.
\membersection{wxDataStream::WriteLine}
\func{void}{wxDataStream::WriteLine}{{\param const wxString& }{string}}
\func{void}{wxDataStream::WriteLine}{{\param const wxString\& }{string}}
Writes {\it string} as a line. Depending on the operating system, it adds
\\n or \\r\\n.
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "referenc"
%%% End:

View File

@@ -1,4 +1,11 @@
\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report}
\documentstyle[a4,11pt,makeidx,verbatim,texhelp,fancyheadings,palatino]{thesis}
%KB:
\addtolength{\textwidth}{1in}
\addtolength{\oddsidemargin}{-0.5in}
\addtolength{\topmargin}{-0.5in}
\addtolength{\textheight}{1in}
\sloppy
%end of my changes
\newcommand{\indexit}[1]{#1\index{#1}}%
\newcommand{\pipe}[0]{$\|$\ }%
\definecolour{black}{0}{0}{0}%

View File

@@ -141,27 +141,27 @@ Returns TRUE if the item is a separator.
\membersection{wxMenuItem::SetBackgroundColour}\label{wxmenuitemsetbackgroundcolour}
\constfunc{void}{SetBackgroundColour}{\param{const wxColour& }{colour}}
\constfunc{void}{SetBackgroundColour}{\param{const wxColour\& }{colour}}
Sets the background colour associated with the menu item (Windows only).
\membersection{wxMenuItem::SetBitmaps}\label{wxmenuitemsetbitmaps}
\constfunc{void}{SetBitmaps}{\param{const wxBitmap& }{checked},
\param{const wxBitmap& }{unchecked = wxNullBitmap}}
\constfunc{void}{SetBitmaps}{\param{const wxBitmap\& }{checked},
\param{const wxBitmap\& }{unchecked = wxNullBitmap}}
Sets the checked/unchecked bitmaps for the menu item (Windows only). The first bitmap
is also used as the single bitmap for uncheckable menu items.
\membersection{wxMenuItem::SetFont}\label{wxmenuitemsetfont}
\constfunc{void}{SetFont}{\param{const wxFont& }{font}}
\constfunc{void}{SetFont}{\param{const wxFont\& }{font}}
Sets the font associated with the menu item (Windows only).
\membersection{wxMenuItem::SetHelp}\label{wxmenuitemsethelp}
\constfunc{void}{SetHelp}{\param{const wxString& }{helpString}}
\constfunc{void}{SetHelp}{\param{const wxString\& }{helpString}}
Sets the help string.
@@ -173,14 +173,19 @@ Sets the width of the menu item checkmark bitmap (Windows only).
\membersection{wxMenuItem::SetName}\label{wxmenuitemsetname}
\constfunc{void}{SetName}{\param{const wxString& }{text}}
\constfunc{void}{SetName}{\param{const wxString\& }{text}}
Sets the text associated with the menu item.
\membersection{wxMenuItem::SetTextColour}\label{wxmenuitemsettextcolour}
\constfunc{void}{SetTextColour}{\param{const wxColour& }{colour}}
\constfunc{void}{SetTextColour}{\param{const wxColour\& }{colour}}
Sets the text colour associated with the menu item (Windows only).
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "referenc"
%%% End:

View File

@@ -1,4 +1,12 @@
\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report}
\documentstyle[a4,11pt,makeidx,verbatim,texhelp,fancyheadings,palatino]{thesis}
%KB:
\addtolength{\textwidth}{1in}
\addtolength{\oddsidemargin}{-0.5in}
\addtolength{\topmargin}{-0.5in}
\addtolength{\textheight}{1in}
\sloppy
%end of my changes
%\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report}
\newcommand{\indexit}[1]{#1\index{#1}}
\newcommand{\pipe}[0]{$\|$\ }%
\input psbox.tex

View File

@@ -80,9 +80,9 @@ The following priorities are already defined:
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf WXTHREAD_MIN_PRIORITY}}{0}
\twocolitem{{\bf WXTHREAD_DEFAULT_PRIORITY}}{50}
\twocolitem{{\bf WXTHREAD_MAX_PRIORITY}}{100}
\twocolitem{{\bf WXTHREAD\_MIN\_PRIORITY}}{0}
\twocolitem{{\bf WXTHREAD\_DEFAULT\_PRIORITY}}{50}
\twocolitem{{\bf WXTHREAD\_MAX\_PRIORITY}}{100}
\end{twocollist}
\membersection{wxThread::IsAlive}\label{wxthreadisalive}
@@ -119,8 +119,13 @@ The following priorities are already defined:
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf WXTHREAD_MIN_PRIORITY}}{0}
\twocolitem{{\bf WXTHREAD_DEFAULT_PRIORITY}}{50}
\twocolitem{{\bf WXTHREAD_MAX_PRIORITY}}{100}
\twocolitem{{\bf WXTHREAD\_MIN\_PRIORITY}}{0}
\twocolitem{{\bf WXTHREAD\_DEFAULT\_PRIORITY}}{50}
\twocolitem{{\bf WXTHREAD\_MAX\_PRIORITY}}{100}
\end{twocollist}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "referenc"
%%% End:

View File

@@ -4,11 +4,11 @@ GUIs:
-----
__X__ any X, but not GTK
__MOTIF__ Motif
__WXMOTIF__ Motif
__XT__ Xt; mutually exclusive with WX_MOTIF (?)
__GTK__ GTK
__WXGTK__ GTK
__XVIEW__ Obsolete!
__WINDOWS__ Any Windows
__WXMSW__ Any Windows
__MAC__ MacOS
__UNIX__ any Unix
__WIN95__ GUI for Windows 95 and above; NT 4.0 and above.
@@ -16,6 +16,10 @@ __WIN32__ WIN32 API
__NT__ Windows NT
__CURSES__ CURSES
In fact, they should better all start with __WX instead of __ only.
The only GUIs implemented for 2.0 are __WXGTK__, __WXMSW__ and __WXMOTIF__
yet. Any new ones, please start the define with __WX.
OSes/machines:
__HPUX__
@@ -51,6 +55,6 @@ __XLC__ ?? compiler
wxWindows modes:
----------------
__DEBUG__ usage: #ifdef __DEBUG__ (=> debug mode, else => release)
__WXDEBUG__ usage: #ifdef __DEBUG__ (=> debug mode, else => release)
WXDEBUG usage: #if DEBUG (0: release, 1: minimal debug code, ...)

67
docs/wxQt.html Normal file
View File

@@ -0,0 +1,67 @@
$Id$
<br>
<H1>Proposal for a wxQt project</H1>
<p>
Following the recent discussions
and flamewars about KDE vs Gnome, I got worried that we see a
repetition of the same damaging infighting from which Unix has
suffered before. Competition is a good thing, but the current
situation leaves application developers with a difficult decision to
make: Write for KDE, using qt/harmony or write for Gnome, using GTK?
Whatever happens to these projects, we will end up with a lot of
duplicated efforts and a mix of applications written for either of the
two environments. The result will not be the consistent look and feel
that both projects aim for.
<p>
The people on the wxWindows developers team thought that we might have
a solution for this problem, if we can get some outside help to get it
done. Let me explain: wxWindows is a cross-platform development
toolkit, a library of C++ classes which provide GUI concepts as well
as other cross-platform issues such as container classes, debug
features or configuration management. It has been around since 1992G
and started by supporting Motif, XView and MS-Windows, with a direct
X11/Xt port added later. Last year, a major rewrite was started and we
now have a much advanced library, available for MS Windows, with a
Motif port under construction. Later last year, Robert Roebling set
out on a one-man project to build wxGTK, a gtk-based implementation of
wxWindows which in less than a year has become sufficiently stable to
use it as the main development platform of rather large
applications. The wxWindows license is a variant of the LGPL,
which should meet no objections from the free software community. In
fact, this has been an open source project long before the term became
commonly used.
<p>
Our idea is, that if this is good enough to work across different
operating systems (a MacOS port is under construction, too), it could
easily bridge the gap between KDE and Gnome. The quick evolution of
wxGTK has shown that a new port based on an existing widget set or
toolkit can easily be created by a small team within few
months. Therefore, we would like to start a project for a Qt/Harmony
based wxWindow library, wxQt. It would then be possible for
application developers to write the same source and copile it either
for KDE, Gnome or even any of the other supported systems.
<p>
But for this we need help. The core developers are all pretty busy on
the existing ports, but we could provide significant help and support
for any such effort. A wxQt port could also recycle lots of existing
code from the other ports.
Please, join us in this effort and, if you feel that you could
contribute, join the wxWindows developers mainling list for further
discussions. Just send a mail containing "<tt>subscribe</tt>" to
<tt>wxwin-developers-request@x.dent.med.uni-muenchen.de</tt>
<p>
You can find some more information about wxWindows at the following places:
<ul>
<li>The <a href="http://web.ukonline.co.uk/julian.smart/wxwin/">wxWindows homepage</a>.
<li>The <a href="http://www.freiburg.linux.de/~wxxt/">wxGTK homepage</a>
<li>The <a href="http://Ballueder.home.ml.org/M/">home of <em>M</em></a>, an email client developed using wxGTK, showing several <a href="http://Ballueder.home.ml.org/M/screenshots/">screenshots</a> of how it actually looks like.
</ul>
<p>
<hr>
Karsten Ballueder <tt><a
href="mailto:Ballueder@usa.net">Ballueder@usa.net</a> <a
href="http://Ballueder.home.ml.org/">http://Ballueder.home.ml.org/</a></tt>

View File

@@ -12,22 +12,22 @@
#ifndef __APPH_BASE__
#define __APPH_BASE__
#ifndef __GTK__
#ifndef __WXGTK__
class WXDLLEXPORT wxApp;
typedef wxApp* (*wxAppInitializerFunction) (void);
#endif
#include "wx/object.h"
#ifdef __GTK__
#ifdef __WXGTK__
typedef wxObject* (*wxAppInitializerFunction) (void); // returning wxApp* won't work with gcc
#endif
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/app.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/app.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/app.h"
#endif

View File

@@ -1,11 +1,11 @@
#ifndef __BITMAPH_BASE__
#define __BITMAPH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/bitmap.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/bitmap.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/bitmap.h"
#endif

View File

@@ -1,11 +1,11 @@
#ifndef __BMPBUTTONH_BASE__
#define __BMPBUTTONH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/bmpbuttn.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/bmpbuttn.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/bmpbuttn.h"
#endif

View File

@@ -1,11 +1,11 @@
#ifndef __BRUSHH_BASE__
#define __BRUSHH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/brush.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/brush.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/brush.h"
#endif

View File

@@ -1,11 +1,11 @@
#ifndef __BUTTONH_BASE__
#define __BUTTONH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/button.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/button.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/button.h"
#endif

View File

@@ -1,11 +1,11 @@
#ifndef __CHECKBOXH_BASE__
#define __CHECKBOXH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/checkbox.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/checkbox.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/checkbox.h"
#endif

View File

@@ -1,11 +1,11 @@
#ifndef __CHOICEH_BASE__
#define __CHOICEH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/choice.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/choice.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/choice.h"
#endif

View File

@@ -1,11 +1,11 @@
#ifndef __CLIPBRDH_BASE__
#define __CLIPBRDH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/clipbrd.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/clipbrd.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/clipbrd.h"
#endif

View File

@@ -82,7 +82,7 @@ class WXDLLEXPORT wxPrintData: public wxObject
DECLARE_DYNAMIC_CLASS(wxPrintData)
public:
#ifdef __WINDOWS__
#ifdef __WXMSW__
void *printData;
#endif
int printFromPage;
@@ -137,7 +137,7 @@ class WXDLLEXPORT wxPrintData: public wxObject
void operator=(const wxPrintData& data);
#ifdef __WINDOWS__
#ifdef __WXMSW__
// Convert to/from the PRINTDLG structure
void ConvertToNative(void);
void ConvertFromNative(void);

View File

@@ -1,11 +1,11 @@
#ifndef __COLORDLGH_BASE__
#define __COLORDLGH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/colordlg.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/generic/colrdlgg.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/generic/colrdlgg.h"
#endif

View File

@@ -1,11 +1,11 @@
#ifndef __COMBOBOXH_BASE__
#define __COMBOBOXH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/combobox.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/combobox.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/combobox.h"
#endif

View File

@@ -60,12 +60,12 @@
$VARNAME or ${VARNAME} where VARNAME contains alphanumeric characters and
'_' only. '$' must be escaped ('\$') in order to be taken literally.
*/
extern wxString ExpandEnvVars(const wxString& str);
extern wxString wxExpandEnvVars(const char *sz);
/*
Split path into parts removing '..' in progress
*/
extern void SplitPath(wxArrayString& aParts, const char *sz);
extern void wxSplitPath(wxArrayString& aParts, const char *sz);
// ----------------------------------------------------------------------------
// abstract base class wxConfig which defines the interface for derived classes
@@ -89,7 +89,7 @@ public:
static void Create();
// ctor & virtual dtor
wxConfig() { }
wxConfig() { m_bExpandEnvVars = TRUE; }
virtual ~wxConfig();
// path management
@@ -108,6 +108,10 @@ public:
// enumerate entries
virtual bool GetFirstEntry(wxString& str, long& lIndex) = 0;
virtual bool GetNextEntry (wxString& str, long& lIndex) = 0;
// get number of entries/subgroups in the current group, with or without
// it's subgroups
virtual uint GetNumberOfEntries(bool bRecursive = FALSE) const = 0;
virtual uint GetNumberOfGroups(bool bRecursive = FALSE) const = 0;
// tests of existence
// returns TRUE if the group by this name exists
@@ -150,6 +154,15 @@ public:
// primarly for use by desinstallation routine.
virtual bool DeleteAll() = 0;
// options
// we can automatically expand environment variables in the config entries
// (this option is on by default, you can turn it on/off at any time)
bool IsExpandingEnvVars() const { return m_bExpandEnvVars; }
void SetExpandEnvVars(bool bDoIt = TRUE) { m_bExpandEnvVars = bDoIt; }
// does expansion only if needed
wxString ExpandEnvVars(const wxString& str) const
{ return IsExpandingEnvVars() ? wxExpandEnvVars(str) : str; }
protected:
static bool IsImmutable(const char *szKey)
{ return *szKey == APPCONF_IMMUTABLE_PREFIX; }
@@ -157,7 +170,7 @@ protected:
// a handy little class which changes current path to the path of given entry
// and restores it in dtor: so if you declare a local variable of this type,
// you work in the entry directory and the path is automatically restored
// when function returns
// when the function returns
class PathChanger
{
public:
@@ -175,6 +188,7 @@ protected:
bool m_bChanged; // was the path changed?
};
private:
// are we doing automatic environment variable expansion?
bool m_bExpandEnvVars;

View File

@@ -1,11 +1,11 @@
#ifndef __CONTROLH_BASE__
#define __CONTROLH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/control.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/control.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/control.h"
#endif

View File

@@ -1,11 +1,11 @@
#ifndef __CURSORH_BASE__
#define __CURSORH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/cursor.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/cursor.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/cursor.h"
#endif

View File

@@ -16,15 +16,12 @@
#pragma interface "datstrm.h"
#endif
#include "wx/wx.h"
#include <wx/stream.h>
class wxDataStream {
class wxDataInputStream: public wxFilterInputStream {
public:
wxDataStream(iostream& s);
wxDataStream(istream& s);
wxDataStream(ostream& s);
virtual ~wxDataStream();
wxDataInputStream(wxInputStream& s);
virtual ~wxDataInputStream();
unsigned long Read32();
unsigned short Read16();
@@ -32,6 +29,12 @@ public:
double ReadDouble();
wxString ReadLine();
wxString ReadString();
};
class wxDataOutputStream: public wxFilterOutputStream {
public:
wxDataOutputStream(wxOutputStream& s);
virtual ~wxDataOutputStream();
void Write32(unsigned long i);
void Write16(unsigned short i);
@@ -39,10 +42,7 @@ public:
void WriteDouble(double d);
void WriteLine(const wxString& line);
void WriteString(const wxString& string);
protected:
istream *m_istream;
ostream *m_ostream;
};
#endif
// __HELPBASEH__
// __DATSTREAMH__

View File

@@ -1,11 +1,11 @@
#ifndef __DCH_BASE__
#define __DCH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/dc.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/dc.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/dc.h"
#endif

View File

@@ -1,11 +1,11 @@
#ifndef __DCCLIENTH_BASE__
#define __DCCLIENTH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/dcclient.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/dcclient.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/dcclient.h"
#endif

View File

@@ -1,11 +1,11 @@
#ifndef __DCMEMORYH_BASE__
#define __DCMEMORYH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/dcmemory.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/dcmemory.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/dcmemory.h"
#endif

View File

@@ -1,7 +1,7 @@
#ifndef __DCPRINTH_BASE__
#define __DCPRINTH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/dcprint.h"
#endif

View File

@@ -1,11 +1,11 @@
#ifndef __DCSCREENH_BASE__
#define __DCSCREENH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/dcscreen.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/dcscreen.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/dcscreen.h"
#endif

View File

@@ -1,11 +1,11 @@
#ifndef __DDEH_BASE__
#define __DDEH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/dde.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/dde.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/dde.h"
#endif

View File

@@ -9,8 +9,8 @@
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifndef __DEBUGH__
#define __DEBUGH__
#ifndef __WXDEBUGH__
#define __WXDEBUGH__
#include <assert.h>
@@ -31,7 +31,7 @@
<BR>
<BR>
Extensive use of these macros is recommended! Remember that ASSERTs are
disabled in final (without DEBUG defined) build, so they add strictly
disabled in final (without WXDEBUG defined) build, so they add strictly
nothing to your program's code. On the other hand, CHECK macros do stay
even in release builds, but in general are not much of a burden, while
a judicious use of them might increase your program's stability.
@@ -43,7 +43,7 @@
/** @name Macros which are completely disabled in 'release' mode */
//@{
#ifdef __DEBUG__
#ifdef __WXDEBUG__
/**
this function may be redefined to do something non trivial and is called
whenever one of debugging macros fails (i.e. condition is false in an
@@ -62,7 +62,7 @@
// no more bugs ;-)
#define wxASSERT(cond)
#define wxASSERT_MSG(x, m)
#endif //DEBUG
#endif //WXDEBUG
/// special form of assert: always triggers it (in debug mode)
#define wxFAIL wxASSERT(0)
@@ -99,5 +99,5 @@
//@}
#endif // __DEBUGH__
#endif // __WXDEBUGH__

View File

@@ -16,7 +16,7 @@
#pragma interface "defs.h"
#endif
#ifdef __GTK__
#ifdef __WXGTK__
#include "glib.h"
#include "gdk/gdk.h"
@@ -43,14 +43,14 @@
//////////////////////////////////////////////////////////////////////////////////
// Currently Only MS-Windows/NT, XView and Motif are supported
//
#if defined(__HPUX__) && !defined(__MOTIF__)
# define __MOTIF__
#if defined(__HPUX__) && !defined(__WXMOTIF__)
# define __WXMOTIF__
#endif
#if defined(__MOTIF__)
#if defined(__WXMOTIF__)
# define __X__
#elif defined(__WINDOWS__) || defined(__WINDOWS_386__) || defined(__NT__) || defined(__MSDOS__)
# ifndef __WINDOWS__
# define __WINDOWS__
#elif defined(__WXMSW__) || defined(__WINDOWS_386__) || defined(__NT__) || defined(__MSDOS__)
# ifndef __WXMSW__
# define __WXMSW__
# endif
#endif
@@ -68,13 +68,13 @@
#endif
// Make sure the environment is set correctly
#if defined(__WINDOWS__) && defined(__X__)
#if defined(__WXMSW__) && defined(__X__)
# error "Target can't be both X and Windows"
#elif !defined(__MOTIF__) && !defined(__WINDOWS__) && !defined(__GTK__) && !defined(__MAC__) && !defined(__X__)
#error "No Target! Use -D[__MOTIF__|__GTK__|__WINDOWS__|__MAC__]"
#elif !defined(__WXMOTIF__) && !defined(__WXMSW__) && !defined(__WXGTK__) && !defined(__MAC__) && !defined(__X__)
#error "No Target! Use -D[__WXMOTIF__|__WXGTK__|__WXMSW__|__MAC__]"
#endif
#if defined(__MOTIF__) || defined(__GTK__)
#if defined(__WXMOTIF__) || defined(__WXGTK__)
// Bool is now obsolete, use bool instead
// typedef int Bool;
@@ -85,7 +85,7 @@
# define Bool_DEFINED
#endif
#elif defined(__WINDOWS__)
#elif defined(__WXMSW__)
#ifndef TRUE
# define TRUE 1
@@ -119,7 +119,7 @@ typedef int wxWindowID;
* Making or using wxWindows as a Windows DLL
*/
#ifdef __WINDOWS__
#ifdef __WXMSW__
#ifdef __BORLANDC__
@@ -230,8 +230,8 @@ enum ErrCode
#endif
#ifndef __UNIX__ // Windows
#ifndef __WINDOWS__
#define __WINDOWS__
#ifndef __WXMSW__
#define __WXMSW__
#endif
#if defined(_MSC_VER)
@@ -248,7 +248,7 @@ enum ErrCode
#if defined(__UNIX__)
#define FILE_PATH_SEPARATOR ('/')
#elif defined(__WINDOWS__)
#elif defined(__WXMSW__)
#define FILE_PATH_SEPARATOR ('\\')
#else
#error "don't know path separator for this platform"
@@ -833,7 +833,7 @@ enum {
#define wxID_YES 5103
#define wxID_NO 5104
#ifdef __WINDOWS__
#ifdef __WXMSW__
// Stand-ins for Windows types, to avoid
// #including all of windows.h

View File

@@ -1,11 +1,11 @@
#ifndef __DIALOGH_BASE__
#define __DIALOGH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/dialog.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/dialog.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/dialog.h"
#endif

View File

@@ -1,11 +1,11 @@
#ifndef __DIRDLGH_BASE__
#define __DIRDLGH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/dirdlg.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/dirdlg.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/dirdlg.h"
#endif

View File

@@ -1,12 +1,12 @@
#ifndef __DNDH_BASE__
#define __DNDH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/ole/dropsrc.h"
#include "wx/msw/ole/droptgt.h"
#include "wx/msw/ole/dataobj.h"
#elif defined(__MOTIF__)
#elif defined(__GTK__)
#elif defined(__WXMOTIF__)
#elif defined(__WXGTK__)
#include "wx/gtk/dnd.h"
#endif

View File

@@ -283,9 +283,9 @@ class WXDLLEXPORT wxDocManager: public wxEvtHandler
void OnUndo(wxCommandEvent& event);
void OnRedo(wxCommandEvent& event);
#ifdef WXWIN_COMPATIBILITY
virtual wxDocument *CreateDocument(char *WXUNUSED(path), long WXUNUSED(flags = 0)) { return NULL; };
#endif
// Extend event processing to search the view's event table
virtual bool ProcessEvent(wxEvent& event);
virtual wxDocument *CreateDocument(const wxString& path, long flags = 0);
virtual wxView *CreateView(wxDocument *doc, long flags = 0);
virtual void DeleteTemplate(wxDocTemplate *temp, long flags = 0);
@@ -317,7 +317,7 @@ class WXDLLEXPORT wxDocManager: public wxEvtHandler
// Views or windows should inform the document manager
// when a view is going in or out of focus
virtual void ActivateView(wxView *view, bool activate = TRUE, bool deleting = FALSE);
virtual inline wxView *GetCurrentView(void) const { return m_currentView; }
virtual wxView *GetCurrentView(void) const;
virtual inline wxList& GetDocuments(void) const { return (wxList&) m_docs; }

View File

@@ -2,7 +2,7 @@
// Name: dynarray.h
// Purpose: auto-resizable (i.e. dynamic) array support
// Author: Vadim Zeitlin
// Modified by:
// Modified by:
// Created: 12.09.97
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
@@ -17,9 +17,9 @@
#endif
#include "wx/defs.h"
#include "wx/utils.h"
#include "wx/debug.h"
/** @name Dynamic arrays and lists
/** @name Dynamic arrays and lists
@memo Arrays which grow on demand and do range checking (only in debug)
*/
//@{
@@ -30,7 +30,7 @@
/**
the initial size by which an array/list grows when an element is added
default value avoids allocate one or two bytes when the array is created
default value avoids allocate one or two bytes when the array is created
which is rather inefficient
*/
#define WX_ARRAY_DEFAULT_INITIAL_SIZE (16)
@@ -41,7 +41,7 @@
/**
callback compare function for quick sort
must return -1, 0 or +1 if pItem1 <, = or > pItem2
must return negative value, 0 or positive value if pItem1 <, = or > pItem2
*/
#ifdef __VISUALC__
@@ -56,9 +56,9 @@ typedef int (CMPFUNC_CONV *CMPFUNC)(const void* pItem1, const void* pItem2);
base class managing data having size of type 'long' (not used directly)
NB: for efficiency this often used class has no virtual functions (hence no
VTBL), even dtor is <B>not</B> virtual. If used as expected it won't
create any problems because ARRAYs from DEFINE_ARRAY have no dtor at all,
so it's not too important if it's not called (this happens when you cast
VTBL), even dtor is <B>not</B> virtual. If used as expected it won't
create any problems because ARRAYs from DEFINE_ARRAY have no dtor at all,
so it's not too important if it's not called (this happens when you cast
"SomeArray *" as "BaseArray *" and then delete it)
@memo Base class for template array and list classes
@@ -102,7 +102,7 @@ public:
//@}
protected:
// these methods are protected because if they were public one could
// these methods are protected because if they were public one could
// mistakenly call one of them instead of DEFINE_ARRAY's or LIST's
// type safe methods
@@ -123,10 +123,14 @@ protected:
@return index of the first item matched or NOT_FOUND
@see NOT_FOUND
*/
int Index (long lItem, bool bFromEnd = FALSE) const;
int Index(long lItem, bool bFromEnd = FALSE) const;
/// search for an item using binary search in a sorted array
int Index(long lItem, CMPFUNC fnCompare) const;
/// add new element at the end
void Add (long lItem);
/// add new element at given position
void Add(long lItem);
/// add item assuming the array is sorted with fnCompare function
void Add(long lItem, CMPFUNC fnCompare);
/// add new element at given position (it becomes Item[uiIndex])
void Insert(long lItem, uint uiIndex);
/// remove first item matching this value
void Remove(long lItem);
@@ -135,7 +139,7 @@ protected:
//@}
/// sort array elements using given compare function
void Sort(CMPFUNC fCmp);
void Sort(CMPFUNC fnCompare);
private:
void Grow(); // makes array bigger if needed
@@ -153,7 +157,7 @@ private:
// ----------------------------------------------------------------------------
// This macro generates a new array class. It is intended for storage of simple
// types of sizeof()<=sizeof(long) or pointers if sizeof(pointer)<=sizeof(long)
//
//
// NB: it has only inline functions => takes no space at all
// ----------------------------------------------------------------------------
#define _WX_DEFINE_ARRAY(T, name) \
@@ -193,6 +197,60 @@ public: \
void Sort(CMPFUNC##T fCmp) { wxBaseArray::Sort((CMPFUNC)fCmp); } \
}
// ----------------------------------------------------------------------------
// This is the same as the previous macro, but it defines a sorted array.
// Differences:
// 1) it must be given a COMPARE function in ctor which takes 2 items of type
// T* and should return -1, 0 or +1 if the first one is less/greater
// than/equal to the second one.
// 2) the Add() method inserts the item in such was that the array is always
// sorted (it uses the COMPARE function)
// 3) it has no Sort() method because it's always sorted
// 4) Index() method is much faster (the sorted arrays use binary search
// instead of linear one), but Add() is slower.
//
// Summary: use this class when the speed of Index() function is important, use
// the normal arrays otherwise.
//
// NB: it has only inline functions => takes no space at all
// ----------------------------------------------------------------------------
#define _WX_DEFINE_SORTED_ARRAY(T, name) \
typedef int (CMPFUNC_CONV *SCMPFUNC##T)(T pItem1, T pItem2); \
class name : public wxBaseArray \
{ \
public: \
name(SCMPFUNC##T fn) \
{ wxASSERT( sizeof(T) <= sizeof(long) ); m_fnCompare = fn; } \
\
name& operator=(const name& src) \
{ ((wxBaseArray *)this)->operator=((const wxBaseArray&)src); \
m_fnCompare = src.m_fnCompare; \
return *this; } \
\
T& operator[](uint uiIndex) const \
{ return (T&)(wxBaseArray::Item(uiIndex)); } \
T& Item(uint uiIndex) const \
{ return (T&)(wxBaseArray::Item(uiIndex)); } \
T& Last() const \
{ return (T&)(wxBaseArray::Item(Count() - 1)); } \
\
int Index(T Item) const \
{ return wxBaseArray::Index((long)Item, (CMPFUNC)m_fnCompare); }\
\
void Add(T Item) \
{ wxBaseArray::Add((long)Item, (CMPFUNC)m_fnCompare); } \
\
void Remove(uint uiIndex) { wxBaseArray::Remove(uiIndex); } \
void Remove(T Item) \
{ int iIndex = Index(Item); \
wxCHECK2_MSG( iIndex != NOT_FOUND, return, \
"removing inexisting element in wxArray::Remove" ); \
wxBaseArray::Remove((uint)iIndex); } \
\
private: \
SCMPFUNC##T m_fnCompare; \
}
// ----------------------------------------------------------------------------
// see WX_DECLARE_LIST and WX_DEFINE_LIST
// ----------------------------------------------------------------------------
@@ -238,7 +296,7 @@ private: \
}
// ----------------------------------------------------------------------------
/** @name Macros for definition of dynamic arrays and lists
/** @name Macros for definition of dynamic arrays and lists
These macros are ugly (especially if you look in the sources ;-), but they
allow us to define 'template' classes without actually using templates.
@@ -247,7 +305,7 @@ private: \
Range checking is performed in debug build for both arrays and lists. Type
checking is done at compile-time. Warning: arrays <I>never</I> shrink, they
only grow, so loading 10 millions in an array only to delete them 2 lines
below is <I>not</I> recommended. However, it does free memory when it's
below is <I>not</I> recommended. However, it does free memory when it's
destroyed, so if you destroy array also, it's ok.
*/
// ----------------------------------------------------------------------------
@@ -264,6 +322,14 @@ private: \
*/
#define WX_DEFINE_ARRAY(T, name) typedef T _A##name; \
_WX_DEFINE_ARRAY(_A##name, name)
/**
This macro does the same as WX_DEFINE_ARRAY except that the array will be
sorted with the specified compare function.
*/
#define WX_DEFINE_SORTED_ARRAY(T, name) typedef T _A##name; \
_WX_DEFINE_SORTED_ARRAY(_A##name, name)
/**
This macro generates a new list class which owns the objects it contains,
i.e. it will delete them when it is destroyed. An element is of type T*,
@@ -290,11 +356,11 @@ private: \
<BR>
NB1: Base type T should have an accessible copy ctor if Add(T&) is used,
<BR>
NB2: Never ever cast a list to it's base type: as dtor is <B>not</B> virtual
NB2: Never ever cast a list to it's base type: as dtor is <B>not</B> virtual
it will provoke memory leaks
<BR>
<BR>
some functions of this class are not inline, so it takes some space to
some functions of this class are not inline, so it takes some space to
define new class from this template.
@memo declare list class 'name' containing elements of type 'T'
@@ -313,7 +379,7 @@ private: \
This is necessary because at the moment of DEFINE_LIST class element_type
must be fully defined (i.e. forward declaration is not enough), while
DECLARE_LIST may be done anywhere. The separation of two allows to break
cicrcular dependencies with classes which have member variables of list
cicrcular dependencies with classes which have member variables of list
type.
@memo define (must include listimpl.cpp!) list class 'name'

View File

@@ -157,6 +157,8 @@ enum wxEventType {
wxEVT_COMMAND_TREE_SET_INFO,
wxEVT_COMMAND_TREE_ITEM_EXPANDED,
wxEVT_COMMAND_TREE_ITEM_EXPANDING,
wxEVT_COMMAND_TREE_ITEM_COLLAPSED,
wxEVT_COMMAND_TREE_ITEM_COLLAPSING,
wxEVT_COMMAND_TREE_SEL_CHANGED,
wxEVT_COMMAND_TREE_SEL_CHANGING,
wxEVT_COMMAND_TREE_KEY_DOWN,

View File

@@ -17,20 +17,9 @@
#pragma interface "file.h"
#endif
// ----------------------------------------------------------------------------
// simple types
// ----------------------------------------------------------------------------
#include "wx/string.h"
#include "wx/filefn.h"
// define off_t
#include <sys/types.h>
#ifdef _MSC_VER
#define off_t _off_t
#endif
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
@@ -54,8 +43,6 @@ public:
enum OpenMode { read, write, read_write, write_append };
// standard values for file descriptor
enum { fd_invalid = -1, fd_stdin, fd_stdout, fd_stderr };
// seek type
enum SeekMode { FromStart, FromEnd, FromCurrent };
// static functions
// ----------------
@@ -73,7 +60,7 @@ public:
// open/close
bool Create(const char *szFileName, bool bOverwrite = FALSE);
bool Open(const char *szFileName, OpenMode mode = read);
inline bool Close(); // Close is a NOP if not opened
bool Close(); // Close is a NOP if not opened
// assign an existing file descriptor and get it back from wxFile object
void Attach(int fd) { Close(); m_fd = fd; }
@@ -84,17 +71,17 @@ public:
// returns number of bytes read or ofsInvalid on error
off_t Read(void *pBuf, off_t nCount);
// returns true on success
bool Write(const void *pBuf, uint nCount);
uint Write(const void *pBuf, uint nCount);
// returns true on success
bool Write(const wxString& str) { return Write(str.c_str(), str.Len()); }
bool Write(const wxString& s) { return Write(s.c_str(), s.Len()) != 0; }
// flush data not yet written
bool Flush();
// file pointer operations (return ofsInvalid on failure)
// move ptr ofs bytes related to start/current off_t/end of file
off_t Seek(off_t ofs, SeekMode mode = FromStart);
off_t Seek(off_t ofs, wxSeekMode mode = wxFromStart);
// move ptr to ofs bytes before the end
off_t SeekEnd(off_t ofs = 0) { return Seek(ofs, FromEnd); }
off_t SeekEnd(off_t ofs = 0) { return Seek(ofs, wxFromEnd); }
// get current off_t
off_t Tell() const;
// get current file length
@@ -105,6 +92,8 @@ public:
bool IsOpened() const { return m_fd != fd_invalid; }
// is end of file reached?
bool Eof() const;
// is an error occured?
bool Error() const { return m_error; }
// dtor closes the file if opened
~wxFile();
@@ -117,6 +106,7 @@ private:
wxFile& operator=(const wxFile&);
int m_fd; // file descriptor or INVALID_FD if not opened
bool m_error; // error memory
};
// ----------------------------------------------------------------------------
@@ -142,8 +132,8 @@ public:
bool IsOpened() const { return m_file.IsOpened(); }
// I/O (both functions return true on success, false on failure)
bool Write(const void *p, uint n) { return m_file.Write(p, n); }
bool Write(const wxString& str) { return m_file.Write(str); }
bool Write(const void *p, uint n) { return m_file.Write(p, n) != 0; }
bool Write(const wxString& str) { return m_file.Write(str); }
// different ways to close the file
// validate changes and delete the old file of name m_strName
@@ -161,4 +151,4 @@ private:
};
#endif
// __FILEH__
// __FILEH__

View File

@@ -118,6 +118,9 @@ public:
virtual bool GetFirstEntry(wxString& str, long& lIndex);
virtual bool GetNextEntry (wxString& str, long& lIndex);
virtual uint GetNumberOfEntries(bool bRecursive = FALSE) const;
virtual uint GetNumberOfGroups(bool bRecursive = FALSE) const;
virtual bool HasGroup(const wxString& strName) const;
virtual bool HasEntry(const wxString& strName) const;
@@ -197,8 +200,8 @@ private:
//protected: --- if wxFileConfig::ConfigEntry is not public, functions in
// ConfigGroup such as Find/AddEntry can't return "ConfigEntry *"
public:
WX_DEFINE_ARRAY(ConfigEntry *, ArrayEntries);
WX_DEFINE_ARRAY(ConfigGroup *, ArrayGroups);
WX_DEFINE_SORTED_ARRAY(ConfigEntry *, ArrayEntries);
WX_DEFINE_SORTED_ARRAY(ConfigGroup *, ArrayGroups);
class ConfigEntry
{
@@ -231,7 +234,6 @@ public:
void SetLine(LineList *pLine);
};
protected:
class ConfigGroup
{
private:

View File

@@ -1,11 +1,11 @@
#ifndef __FILEDLGH_BASE__
#define __FILEDLGH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/filedlg.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/filedlg.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/filedlg.h"
#endif

View File

@@ -6,7 +6,7 @@
// Created: 29/01/98
// RCS-ID: $Id$
// Copyright: (c) 1998 Julian Smart
// Licence: wxWindows license
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifndef __FILEFNH__
@@ -16,8 +16,28 @@
#pragma interface "filefn.h"
#endif
#include "wx/list.h"
#include <wx/list.h>
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
// define off_t
#include <sys/types.h>
#ifdef _MSC_VER
#define off_t _off_t
#endif
typedef enum {
wxFromStart,
wxFromCurrent,
wxFromEnd
} wxSeekMode;
// ----------------------------------------------------------------------------
// functions
// ----------------------------------------------------------------------------
bool WXDLLEXPORT wxFileExists(const wxString& filename);
#define FileExists wxFileExists
@@ -133,6 +153,14 @@ bool WXDLLEXPORT wxRmdir(const wxString& dir, int flags = 0);
#define PATH_SEP PATH_SEP_DOS
#endif // Unix/Windows
// this is useful for wxString::IsSameAs(): to compare two file names use
// filename1.IsSameAs(filename2, wxARE_FILENAMES_CASE_SENSITIVE)
#ifdef __UNIX__
#define wxARE_FILENAMES_CASE_SENSITIVE TRUE
#else // Windows
#define wxARE_FILENAMES_CASE_SENSITIVE FALSE
#endif // Unix/Windows
// is the char a path separator?
inline bool wxIsPathSeparator(char c)
{ return c == FILE_SEP_PATH_DOS || c == FILE_SEP_PATH_UNIX; }
@@ -140,9 +168,20 @@ inline bool wxIsPathSeparator(char c)
// does the string ends with path separator?
bool WXDLLEXPORT wxEndsWithPathSeparator(const char *pszFileName);
// split the full path into path (including drive for DOS), name and extension
// (understands both '/' and '\\')
void WXDLLEXPORT wxSplitPath(const char *pszFileName,
wxString *pstrPath,
wxString *pstrName,
wxString *pstrExt);
// find a file in a list of directories, returns false if not found
bool WXDLLEXPORT wxFindFileInPath(wxString *pStr, const char *pszPath, const char *pszFile);
// ----------------------------------------------------------------------------
// classes
// ----------------------------------------------------------------------------
// Path searching
class WXDLLEXPORT wxPathList: public wxStringList
{

View File

@@ -1,11 +1,11 @@
#ifndef __FONTH_BASE__
#define __FONTH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/font.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/font.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/font.h"
#endif

View File

@@ -1,11 +1,11 @@
#ifndef __FONTDLGH_BASE__
#define __FONTDLGH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/fontdlg.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/generic/fontdlgg.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/generic/fontdlgg.h"
#endif

View File

@@ -1,11 +1,11 @@
#ifndef __FRAMEH_BASE__
#define __FRAMEH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/frame.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/frame.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/frame.h"
#endif

72
include/wx/fstream.h Normal file
View File

@@ -0,0 +1,72 @@
/////////////////////////////////////////////////////////////////////////////
// Name: fstream.h
// Purpose: File stream classes
// Author: Guilhem Lavaux
// Modified by:
// Created: 11/07/98
// RCS-ID: $Id$
// Copyright: (c) Guilhem Lavaux
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __WXFSTREAM_H__
#define __WXFSTREAM_H__
#include <wx/object.h>
#include <wx/string.h>
#include <wx/stream.h>
#include <wx/file.h>
class wxFileInputStream: virtual public wxFile, public wxInputStream {
public:
wxFileInputStream(const wxString& fileName);
virtual ~wxFileInputStream();
wxInputStream& Read(void *buffer, size_t size);
off_t SeekI(off_t pos, wxSeekMode mode = wxFromStart);
off_t TellI() const;
bool Eof() const { return m_eof; }
size_t LastRead() const { return m_lastread; }
bool Ok() const { return wxFile::IsOpened(); }
protected:
wxFileInputStream() {}
protected:
bool m_eof;
bool m_ok_i;
size_t m_lastread;
};
class wxFileOutputStream: virtual wxFile, public wxOutputStream {
public:
wxFileOutputStream(const wxString& fileName);
virtual ~wxFileOutputStream();
wxOutputStream& Write(const void *buffer, size_t size);
off_t SeekO(off_t pos, wxSeekMode mode = wxFromStart);
off_t TellO() const;
bool Bad() const { return m_bad; }
size_t LastWrite() const { return m_lastwrite; }
void Sync();
bool IsOpened() const { return wxFile::IsOpened(); }
protected:
wxFileOutputStream() {}
protected:
bool m_bad;
size_t m_lastwrite;
};
class wxFileStream: public wxFileInputStream, public wxFileOutputStream {
public:
wxFileStream(const wxString& fileName);
virtual ~wxFileStream();
};
#endif

View File

@@ -1,11 +1,11 @@
#ifndef __GAUGEH_BASE__
#define __GAUGEH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/gauge.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/gauge.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/gauge.h"
#endif

View File

@@ -21,11 +21,11 @@
#include "wx/hash.h"
#include "wx/setup.h"
#ifdef __WINDOWS__
#ifdef __WXMSW__
#include "wx/msw/colour.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/colour.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/colour.h"
#endif
@@ -98,7 +98,7 @@ class WXDLLEXPORT wxRealPoint
class WXDLLEXPORT wxPoint
{
public:
#if defined(__WINDOWS__) && !defined(__WIN32__)
#if defined(__WXMSW__) && !defined(__WIN32__)
int x;
int y;
#else
@@ -330,7 +330,7 @@ extern void WXDLLEXPORT wxSetCursor(const wxCursor& cursor);
// Useful macro for create icons portably
#ifdef __WINDOWS__
#ifdef __WXMSW__
# define wxICON(X) wxIcon(X##_icon);
#elif defined(__X__)
# define wxICON(X) wxIcon(X##_bits, X##_width, X##_height);

View File

@@ -1,11 +1,11 @@
#ifndef __GDIOBJH_BASE__
#define __GDIOBJH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/gdiobj.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/gdiobj.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/gdiobj.h"
#endif

View File

@@ -116,7 +116,7 @@ class WXDLLEXPORT wxGenericColourDialog: public wxDialog
DECLARE_EVENT_TABLE()
};
#ifdef __GTK__
#ifdef __WXGTK__
typedef wxGenericColourDialog wxColourDialog;
#endif

View File

@@ -25,7 +25,7 @@
#include "wx/helpbase.h"
#ifdef __WINDOWS__
#ifdef __WXMSW__
#include "wx/dde.h"
#else
// Or whatever it'll be called
@@ -38,7 +38,7 @@ class WXDLLEXPORT wxXLPHelpController;
// wxHelp process and the application
class WXDLLEXPORT wxXLPHelpConnection: public
#ifdef __WINDOWS__
#ifdef __WXMSW__
wxDDEConnection
#else
wxTCPConnection
@@ -62,7 +62,7 @@ class WXDLLEXPORT wxXLPHelpConnection: public
// controlling the wxHelp process
class WXDLLEXPORT wxXLPHelpClient: public
#ifdef __WINDOWS__
#ifdef __WXMSW__
wxDDEClient
#else
wxTCPClient

View File

@@ -47,7 +47,7 @@ class wxImageList: public wxObject
public:
wxImageList::wxImageList() { }
wxImageList(int width, int height, bool mask = TRUE, int initialCount = 1);
wxImageList( int width, int height, bool mask = TRUE, int initialCount = 1 );
~wxImageList();
bool Create();
int GetImageCount() const;
@@ -62,6 +62,8 @@ class wxImageList: public wxObject
private:
wxList m_images;
int m_width;
int m_height;
};
#endif // __IMAGELISTH_G__

View File

@@ -594,6 +594,7 @@ class wxListCtrl: public wxControl
bool GetItemPosition( long item, wxPoint& pos ) const; // not supported in wxGLC
bool SetItemPosition( long item, const wxPoint& pos ); // not supported in wxGLC
int GetItemCount(void);
void SetItemSpacing( int spacing, bool isSmall = FALSE );
int GetItemSpacing( bool isSmall );
int GetSelectedItemCount(void);
// wxColour GetTextColour(void) const; // wxGLC has colours for every Item (see wxListItem)

View File

@@ -40,7 +40,7 @@ public:
DECLARE_EVENT_TABLE()
};
#ifndef __WINDOWS__
#ifndef __WXMSW__
#define wxMessageDialog wxGenericMessageDialog
int wxMessageBox(const wxString& message, const wxString& caption = wxMessageBoxCaptionStr,

View File

@@ -194,6 +194,8 @@ typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&);
#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
@@ -272,6 +274,7 @@ public:
long InsertItem( long parent, wxTreeItem &info,
long insertAfter = wxTREE_INSERT_LAST );
void DeleteItem( long item );
void DeleteChildren( long item );
bool DeleteAllItems();
bool ExpandItem( long item, int action );
bool GetItem( wxTreeItem &info ) const;

View File

@@ -102,6 +102,8 @@ class wxBitmap: public wxObject
wxMask *GetMask(void) const;
void SetMask( wxMask *mask );
void Resize( int height, int width );
bool SaveFile( const wxString &name, int type, wxPalette *palette = NULL );
bool LoadFile( const wxString &name, int type );
@@ -121,6 +123,10 @@ class wxBitmap: public wxObject
GdkPixmap *GetPixmap(void) const;
GdkBitmap *GetBitmap(void) const;
void DestroyImage(void);
void RecreateImage(void);
void Render(void);
// no data :-)
};

View File

@@ -20,6 +20,7 @@
#include "wx/object.h"
#include "wx/string.h"
#include "wx/gdiobj.h"
#include "wx/palette.h"
//-----------------------------------------------------------------------------
// classes

View File

@@ -99,6 +99,7 @@ class wxPaintDC: public wxDC
GdkGC *m_textGC;
GdkGC *m_bgGC;
GdkColormap *m_cmap;
bool m_isDrawable;
void SetUpDC(void);
GdkWindow *GetWindow(void);

View File

@@ -38,7 +38,7 @@ class WXDLLEXPORT wxMemoryDC: public wxPaintDC
wxMemoryDC( wxDC *dc ); // Create compatible DC
~wxMemoryDC(void);
virtual void SelectObject( const wxBitmap& bitmap );
void GetSize( int *width, int *height );
void GetSize( int *width, int *height ) const;
private:
friend wxPaintDC;

View File

@@ -70,7 +70,9 @@ class wxFrame: public wxWindow
wxString GetTitle(void) const;
void OnActivate( wxActivateEvent &WXUNUSED(event) ) {};
void GtkOnSize( int width, int height );
//private:
void GtkOnSize( int x, int y, int width, int height );
private:

View File

@@ -40,10 +40,8 @@ public:
inline wxIcon(const wxIcon& icon) { Ref(icon); }
inline wxIcon(const wxIcon* icon) { if (icon) Ref(*icon); }
wxIcon( char **bits, int width=-1, int height=-1 ) :
wxBitmap( bits ) {};
wxIcon( char **bits, int width=-1, int height=-1 );
inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; }
inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; }
inline bool operator != (const wxIcon& icon) { return m_refData != icon.m_refData; }

View File

@@ -31,6 +31,7 @@ class wxNotebookPage;
// ----------------------------------------------------------------------------
// notebook events
// ----------------------------------------------------------------------------
class wxNotebookEvent : public wxCommandEvent
{
public:
@@ -136,12 +137,15 @@ public:
// get the panel which represents the given page
wxWindow *GetPage(int nPage) const;
// base class virtuals
virtual void AddChild(wxWindow *child);
// implementation
// --------------
// callbacks
void OnSize(wxSizeEvent&);
protected:
// wxWin callbacks
void OnSize(wxSizeEvent& event);
// base class virtuals
virtual void AddChild(wxWindow *child);
virtual void SetConstraintSizes(bool recurse);
virtual bool DoPhase(int phase);
private:
// common part of all ctors

View File

@@ -222,6 +222,7 @@ class wxWindow: public wxEvtHandler
bool m_hasScrolling;
bool m_hasVMT;
bool m_sizeSet;
bool m_resizing;
public: // Layout section

View File

@@ -102,6 +102,8 @@ class wxBitmap: public wxObject
wxMask *GetMask(void) const;
void SetMask( wxMask *mask );
void Resize( int height, int width );
bool SaveFile( const wxString &name, int type, wxPalette *palette = NULL );
bool LoadFile( const wxString &name, int type );
@@ -121,6 +123,10 @@ class wxBitmap: public wxObject
GdkPixmap *GetPixmap(void) const;
GdkBitmap *GetBitmap(void) const;
void DestroyImage(void);
void RecreateImage(void);
void Render(void);
// no data :-)
};

View File

@@ -20,6 +20,7 @@
#include "wx/object.h"
#include "wx/string.h"
#include "wx/gdiobj.h"
#include "wx/palette.h"
//-----------------------------------------------------------------------------
// classes

View File

@@ -99,6 +99,7 @@ class wxPaintDC: public wxDC
GdkGC *m_textGC;
GdkGC *m_bgGC;
GdkColormap *m_cmap;
bool m_isDrawable;
void SetUpDC(void);
GdkWindow *GetWindow(void);

View File

@@ -38,7 +38,7 @@ class WXDLLEXPORT wxMemoryDC: public wxPaintDC
wxMemoryDC( wxDC *dc ); // Create compatible DC
~wxMemoryDC(void);
virtual void SelectObject( const wxBitmap& bitmap );
void GetSize( int *width, int *height );
void GetSize( int *width, int *height ) const;
private:
friend wxPaintDC;

View File

@@ -70,7 +70,9 @@ class wxFrame: public wxWindow
wxString GetTitle(void) const;
void OnActivate( wxActivateEvent &WXUNUSED(event) ) {};
void GtkOnSize( int width, int height );
//private:
void GtkOnSize( int x, int y, int width, int height );
private:

View File

@@ -40,10 +40,8 @@ public:
inline wxIcon(const wxIcon& icon) { Ref(icon); }
inline wxIcon(const wxIcon* icon) { if (icon) Ref(*icon); }
wxIcon( char **bits, int width=-1, int height=-1 ) :
wxBitmap( bits ) {};
wxIcon( char **bits, int width=-1, int height=-1 );
inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; }
inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; }
inline bool operator != (const wxIcon& icon) { return m_refData != icon.m_refData; }

View File

@@ -31,6 +31,7 @@ class wxNotebookPage;
// ----------------------------------------------------------------------------
// notebook events
// ----------------------------------------------------------------------------
class wxNotebookEvent : public wxCommandEvent
{
public:
@@ -136,12 +137,15 @@ public:
// get the panel which represents the given page
wxWindow *GetPage(int nPage) const;
// base class virtuals
virtual void AddChild(wxWindow *child);
// implementation
// --------------
// callbacks
void OnSize(wxSizeEvent&);
protected:
// wxWin callbacks
void OnSize(wxSizeEvent& event);
// base class virtuals
virtual void AddChild(wxWindow *child);
virtual void SetConstraintSizes(bool recurse);
virtual bool DoPhase(int phase);
private:
// common part of all ctors

View File

@@ -222,6 +222,7 @@ class wxWindow: public wxEvtHandler
bool m_hasScrolling;
bool m_hasVMT;
bool m_sizeSet;
bool m_resizing;
public: // Layout section

View File

@@ -1,18 +1,18 @@
#ifndef __HELPH_BASE__
#define __HELPH_BASE__
#ifdef __WINDOWS__
#ifdef __WXMSW__
#include "wx/msw/helpwin.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/generic/helphtml.h"
#else
#include "wx/generic/helpxlp.h"
#endif
#ifdef __WINDOWS__
#ifdef __WXMSW__
#define wxHelpController wxWinHelpController
#define classwxHelpController classwxWinHelpController
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#define wxHelpController wxHTMLHelpController
#define classwxHelpController classwxHTMLHelpController
#else

View File

@@ -1,11 +1,11 @@
#ifndef __ICONH_BASE__
#define __ICONH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/icon.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/icon.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/icon.h"
#endif

View File

@@ -1,11 +1,11 @@
#ifndef __IMAGLISTH_BASE__
#define __IMAGLISTH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/imaglist.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/generic/imaglist.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/generic/imaglist.h"
#endif

View File

@@ -43,12 +43,7 @@ typedef unsigned long uint32;
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxLocale;
class WXDLLEXPORT wxMsgCatalog;
// ----------------------------------------------------------------------------
// global functions
// ----------------------------------------------------------------------------
extern wxLocale* WXDLLEXPORT wxGetLocale();
inline const char* wxGetTranslation(const char *sz);
extern WXDLLEXPORT_DATA(wxLocale *) g_pLocale;
// ============================================================================
// locale support
@@ -63,10 +58,10 @@ class WXDLLEXPORT wxLocale
public:
// ctor & dtor
// the ctor has a side effect of changing current locale
wxLocale(const char *szName, // name (for messages)
const char *szShort = NULL, // dir prefix (for msg files)
const char *szLocale = NULL, // locale (for setlocale)
bool bLoadDefault = TRUE); // preload wxstd.mo?
wxLocale(const char *szName, // name (for messages)
const char *szShort = NULL, // dir prefix (for msg files)
const char *szLocale = NULL, // locale (for setlocale)
bool bLoadDefault = TRUE); // preload wxstd.mo?
// restores old locale
~wxLocale();
@@ -110,50 +105,16 @@ private:
};
// ----------------------------------------------------------------------------
// inline functions
// global functions
// ----------------------------------------------------------------------------
inline WXDLLEXPORT wxLocale* wxGetLocale() { return g_pLocale; }
// get the translation of the string in the current locale
inline const char *wxGetTranslation(const char *sz)
inline WXDLLEXPORT const char *wxGetTranslation(const char *sz)
{
wxLocale *pLoc = wxGetLocale();
return pLoc == NULL ? sz : pLoc->GetString(sz);
}
// ============================================================================
// optional features
// ============================================================================
// ----------------------------------------------------------------------------
// wxTString: automatically translates strings to current language
// ----------------------------------------------------------------------------
// this feature should be enabled by defining WX_USE_AUTOTRANS, if it's not
// done no automatic translation is performed
#if USE_AUTOTRANS
class WXDLLEXPORT wxTString
{
public:
// NB: different ctors do different things!
// does translation
wxTString(const char *sz) : m_pcsz(wxGetTranslation(sz)) { }
// no translation
wxTString(const wxString& s) : m_pcsz(s) { }
// NB: no copy ctor, it must be a POD so that we can pass it
// to vararg functions (and it's not needed anyhow)
// implicit conversion
operator const char *() const { return m_pcsz; }
private:
const char *m_pcsz;
};
#else //!USE_AUTOTRANS
#define wxTString wxString
#endif //USE_AUTOTRANS
#define TRANSSTRING_DEFINED
#endif
// __INTLH__

View File

@@ -1,10 +1,10 @@
#ifndef __JOYSTICKH_BASE__
#define __JOYSTICKH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/joystick.h"
#elif defined(__MOTIF__)
#elif defined(__GTK__)
#elif defined(__WXMOTIF__)
#elif defined(__WXGTK__)
#include "wx/gtk/joystick.h"
#endif

View File

@@ -1,11 +1,11 @@
#ifndef __LISTBOXH_BASE__
#define __LISTBOXH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/listbox.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/listbox.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/listbox.h"
#endif

View File

@@ -1,11 +1,11 @@
#ifndef __LISTCTRLH_BASE__
#define __LISTCTRLH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/listctrl.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/generic/listctrl.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/generic/listctrl.h"
#endif

View File

@@ -42,7 +42,7 @@ enum
#define wxTraceResAlloc 0x0004 // trace GDI resource allocation
#define wxTraceRefCount 0x0008 // trace various ref counting operations
#ifdef __WINDOWS__
#ifdef __WXMSW__
#define wxTraceOleCalls 0x0100 // OLE interface calls
#endif
@@ -196,7 +196,7 @@ class wxLogFrame;
class WXDLLEXPORT wxLogWindow : public wxLog
{
public:
wxLogWindow(const wxTString& strTitle, bool bShow = TRUE);
wxLogWindow(const char *szTitle, bool bShow = TRUE);
~wxLogWindow();
// show/hide the log window
@@ -254,16 +254,13 @@ private:
// define wxLog<level>
// -------------------
// NB: all these functions take `wxTString' and not
// `const wxTString&' because according to C++ standard
// the first argument to a vararg function can not be
// an array, function or reference :-(
// the most generic log function
void WXDLLEXPORT wxLogGeneric(wxLogLevel level, wxTString strFormat, ...);
#define DECLARE_LOG_FUNCTION(level) \
extern void WXDLLEXPORT wxLog##level(wxTString strFormat, ...)
extern void WXDLLEXPORT wxLog##level(const char *szFormat, ...)
#define DECLARE_LOG_FUNCTION2(level, arg1) \
extern void WXDLLEXPORT wxLog##level(arg1, const char *szFormat, ...)
// a generic function for all levels (level is passes as parameter)
DECLARE_LOG_FUNCTION2(Generic, wxLogLevel level);
// one function per each level
DECLARE_LOG_FUNCTION(FatalError);
@@ -280,22 +277,22 @@ DECLARE_LOG_FUNCTION(SysError);
// and another one which also takes the error code (for those broken APIs
// that don't set the errno (like registry APIs in Win32))
void WXDLLEXPORT wxLogSysError(long lErrCode, wxTString strFormat, ...);
DECLARE_LOG_FUNCTION2(SysError, long lErrCode);
// debug functions do nothing in release mode
#ifdef __DEBUG__
// NB: debug functions don't translate their arguments
extern void WXDLLEXPORT wxLogDebug(const char *szFormat, ...);
#ifdef __WXDEBUG__
DECLARE_LOG_FUNCTION(Debug);
// first king of LogTrace is uncoditional: it doesn't check the level,
// while the second one does nothing if all of level bits are not set
// in wxLog::GetActive()->GetTraceMask().
extern void WXDLLEXPORT wxLogTrace(const char *szFormat, ...);
extern void WXDLLEXPORT wxLogTrace(wxTraceMask mask,
const char *szFormat, ...);
DECLARE_LOG_FUNCTION(Trace);
DECLARE_LOG_FUNCTION2(Trace, wxTraceMask mask);
#else //!debug
#define wxLogDebug
#define wxLogTrace
// these functions do nothing
inline void wxLogDebug(const char *, ...) { }
inline void wxLogTrace(const char *, ...) { }
inline void wxLogTrace(wxTraceMask, const char *, ...) { }
#endif
@@ -321,15 +318,15 @@ const char* WXDLLEXPORT wxSysErrorMsg(unsigned long nErrCode = 0);
// debug only logging functions: use them with API name and error code
// ----------------------------------------------------------------------------
#ifdef __DEBUG__
#ifdef __WXDEBUG__
#define wxLogApiError(api, rc) \
wxLogDebug("At %s(%d) '%s' failed with error %lx (%s).", \
__FILE__, __LINE__, api, \
rc, wxSysErrorMsg(rc))
#define wxLogLastError(api) wxLogApiError(api, wxSysErrorCode())
#else //!debug
#define wxLogApiError(api, rc)
#define wxLogLastError(api)
inline void wxLogApiError(const char *, long) { }
inline void wxLogLastError(const char *) { }
#endif //debug/!debug
#endif //__LOGH__

View File

@@ -1,11 +1,11 @@
#ifndef __MDIH_BASE__
#define __MDIH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/mdi.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/mdi.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/mdi.h"
#endif

View File

@@ -23,7 +23,7 @@
info, or to be a straight call to the new operator.
*/
#if (DEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT
#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT
#include <stddef.h>
@@ -39,7 +39,7 @@
#define WXDEBUG_NEW new(__FILE__,__LINE__)
#endif
#if DEBUG
#if WXDEBUG
void * wxDebugAlloc(size_t size, char * fileName, int lineNum, bool isObject, bool isVect = FALSE);
void wxDebugFree(void * buf, bool isVect = FALSE);
@@ -263,7 +263,7 @@ void WXDLLEXPORT wxTraceLevel(int level, const char *fmt ...);
#define WXTRACE wxTrace
#define WXTRACELEVEL wxTraceLevel
#else // else part for the #if DEBUG
#else // else part for the #if WXDEBUG
inline void wxTrace(const char *WXUNUSED(fmt)) {}
inline void wxTraceLevel(int WXUNUSED(level), const char *WXUNUSED(fmt)) {}
@@ -272,7 +272,7 @@ inline void wxTraceLevel(int WXUNUSED(level), const char *WXUNUSED(fmt)) {}
#define WXTRACELEVEL TRUE ? (void)0 : wxTraceLevel
#define WXDEBUG_NEW new
#endif // DEBUG
#endif // WXDEBUG
#endif
// __MEMORYH__

View File

@@ -1,11 +1,11 @@
#ifndef __MENUH_BASE__
#define __MENUH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/menu.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/menu.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/menu.h"
#endif

View File

@@ -49,7 +49,7 @@ DECLARE_DYNAMIC_CLASS(wxMenuItem)
public:
// ctor & dtor
wxMenuItem(wxMenu *pParentMenu = NULL, int id = ID_SEPARATOR,
const wxTString& strName = "", const wxTString& wxHelp = "",
const wxString& strName = "", const wxString& wxHelp = "",
bool bCheckable = FALSE, wxMenu *pSubMenu = NULL);
virtual ~wxMenuItem();

View File

@@ -1,7 +1,7 @@
#ifndef __METAFILEH_BASE__
#define __METAFILEH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/metafile.h"
#endif

View File

@@ -1,11 +1,11 @@
#ifndef __MINIFRAMH_BASE__
#define __MINIFRAMH_BASE_
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/minifram.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/xt/minifram.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/minifram.h"
#endif

View File

@@ -1,11 +1,11 @@
#ifndef __MSGDLGH_BASE__
#define __MSGDLGH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/msgdlg.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#include "wx/generic/msgdlgg.h"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/generic/msgdlgg.h"
#endif

75
include/wx/mstream.h Normal file
View File

@@ -0,0 +1,75 @@
/////////////////////////////////////////////////////////////////////////////
// Name: mstream.h
// Purpose: Memory stream classes
// Author: Guilhem Lavaux
// Modified by:
// Created: 11/07/98
// RCS-ID: $Id$
// Copyright: (c) Guilhem Lavaux
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __WXMMSTREAM_H__
#define __WXMMSTREAM_H__
#include <wx/stream.h>
class wxMemoryStreamBase {
protected:
wxMemoryStreamBase();
virtual ~wxMemoryStreamBase();
bool ChangeBufferSize(size_t new_length);
protected:
bool m_persistent;
size_t m_length;
char *m_buffer;
int m_iolimit;
};
class wxMemoryInputStream: virtual public wxMemoryStreamBase, public wxInputStream {
public:
wxMemoryInputStream(const char *data, size_t length);
virtual ~wxMemoryInputStream();
wxInputStream& Read(void *buffer, size_t size);
off_t SeekI(off_t pos, wxSeekMode mode);
off_t TellI() const { return m_position_i; }
bool Eof() const { return m_eof; }
size_t LastRead() const { return m_lastread; }
protected:
bool m_eof;
off_t m_position_i;
size_t m_lastread;
};
class wxMemoryOutputStream: virtual public wxMemoryStreamBase, public wxOutputStream {
public:
wxMemoryOutputStream(char *data = NULL, size_t length = 0);
virtual ~wxMemoryOutputStream();
wxOutputStream& Write(const void *buffer, size_t size);
off_t SeekO(off_t pos, wxSeekMode mode);
off_t TellO() const { return m_position_o; }
bool Bad() const { return m_bad; }
size_t LastWrite() const { return m_lastwrite; }
char *GetData() { return m_buffer; }
size_t GetLength() { return m_length; }
protected:
bool m_bad;
off_t m_position_o;
size_t m_lastwrite;
};
class wxMemoryStream: public wxMemoryInputStream, public wxMemoryOutputStream {
public:
wxMemoryStream(char *data = NULL, size_t length = 0);
virtual ~wxMemoryStream();
};
#endif

View File

@@ -79,7 +79,7 @@ public:
wxPalette m_bitmapPalette;
int m_quality;
#ifdef __WINDOWS__
#ifdef __WXMSW__
WXHBITMAP m_hBitmap;
wxDC * m_selectedInto; // So bitmap knows whether it's been selected into
// a device context (for error checking)

View File

@@ -61,10 +61,11 @@ public:
int ShowModal(void);
};
#define wxOPEN 1
#define wxSAVE 2
#define wxOVERWRITE_PROMPT 4
#define wxHIDE_READONLY 8
#define wxOPEN 0x0001
#define wxSAVE 0x0002
#define wxOVERWRITE_PROMPT 0x0004
#define wxHIDE_READONLY 0x0008
#define wxFILE_MUST_EXIST 0x0010
// File selector - backward compatibility
char* WXDLLEXPORT wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL,

View File

@@ -160,6 +160,8 @@ public:
// -------------------
virtual void Command(wxCommandEvent& event);
virtual bool MSWNotify(WXWPARAM wParam, WXLPARAM lParam);
virtual void SetConstraintSizes(bool recurse = TRUE);
virtual bool DoPhase(int nPhase);
protected:
// common part of all ctors
@@ -167,7 +169,6 @@ protected:
// helper functions
void ChangePage(int nOldSel, int nSel); // change pages
void FitPage(wxNotebookPage *pPage); // fit a page in the tab control
wxImageList *m_pImageList; // we can have an associated image list
wxArrayPages m_aPages; // array of pages

View File

@@ -121,7 +121,7 @@ bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount);
// Debugging support
// ============================================================================
#if defined(__DEBUG__) && defined(_MSC_VER) && (_MSC_VER > 1000)
#if defined(__WXDEBUG__) && defined(_MSC_VER) && (_MSC_VER > 1000)
// ----------------------------------------------------------------------------
//
// ----------------------------------------------------------------------------
@@ -137,10 +137,10 @@ void wxLogQueryInterface(const char *szInterface, REFIID riid);
void wxLogAddRef (const char *szInterface, ULONG cRef);
void wxLogRelease(const char *szInterface, ULONG cRef);
#else //!DEBUG
#else //!WXDEBUG
#define wxLogQueryInterface(szInterface, riid)
#define wxLogAddRef(szInterface, cRef)
#define wxLogRelease(szInterface, cRef)
#endif //DEBUG
#endif //WXDEBUG
#endif //_OLEUTILS_H

View File

@@ -38,9 +38,14 @@ void WXDLLEXPORT wxFillLogFont(LOGFONT *logFont, wxFont *font);
wxFont WXDLLEXPORT wxCreateFontFromLogFont(LOGFONT *logFont); // , bool createNew = TRUE);
#ifdef __GNUWIN32__
#define CASTWNDPROC (long unsigned)
# define CASTWNDPROC (long unsigned)
#else
#define CASTWNDPROC
# ifdef __BORLANDC__
# define CASTWNDPROC
# else
typedef long (_stdcall * WndProcCast) (HWND, unsigned int, unsigned int, long);
# define CASTWNDPROC (WndProcCast)
# endif
#endif
#if !defined(APIENTRY) // NT defines APIENTRY, 3.x not

View File

@@ -116,13 +116,13 @@
// NOW MANDATORY: don't change.
#define USE_MEMORY_TRACING 1
// If 1, enables debugging versions of wxObject::new and
// wxObject::delete *IF* DEBUG is also defined.
// wxObject::delete *IF* WXDEBUG is also defined.
// WARNING: this code may not work with all architectures, especially
// if alignment is an issue.
#define USE_DEBUG_CONTEXT 1
// If 1, enables wxDebugContext, for
// writing error messages to file, etc.
// If DEBUG is not defined, will still use
// If WXDEBUG is not defined, will still use
// normal memory operators.
// It's recommended to set this to 1,
// since you may well need to output

View File

@@ -44,105 +44,112 @@ class WXDLLEXPORT wxTextCtrl: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxTextCtrl)
protected:
wxString fileName;
public:
wxTextCtrl(void);
public:
// creation
// --------
wxTextCtrl();
inline wxTextCtrl(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTextCtrlNameStr)
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTextCtrlNameStr)
#ifndef NO_TEXT_WINDOW_STREAM
:streambuf()
:streambuf()
#endif
{
Create(parent, id, value, pos, size, style, validator, name);
Create(parent, id, value, pos, size, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTextCtrlNameStr);
virtual wxString GetValue(void) const ;
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTextCtrlNameStr);
// accessors
// ---------
virtual wxString GetValue() const ;
virtual void SetValue(const wxString& value);
virtual int GetLineLength(long lineNo) const;
virtual wxString GetLineText(long lineNo) const;
virtual int GetNumberOfLines() const;
// operations
// ----------
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
// Clipboard operations
virtual void Copy(void);
virtual void Cut(void);
virtual void Paste(void);
virtual void Copy();
virtual void Cut();
virtual void Paste();
virtual void SetInsertionPoint(long pos);
virtual void SetInsertionPointEnd(void);
virtual long GetInsertionPoint(void) const ;
virtual long GetLastPosition(void) const ;
virtual void SetInsertionPointEnd();
virtual long GetInsertionPoint() const ;
virtual long GetLastPosition() const ;
virtual void Replace(long from, long to, const wxString& value);
virtual void Remove(long from, long to);
virtual void SetSelection(long from, long to);
virtual void Command(wxCommandEvent& event);
virtual void SetEditable(bool editable);
// streambuf implementation
#ifndef NO_TEXT_WINDOW_STREAM
int overflow(int i);
int sync(void);
int underflow(void);
int sync();
int underflow();
#endif
void OnDropFiles(wxDropFilesEvent& event);
wxTextCtrl& operator<<(const wxString& s);
wxTextCtrl& operator<<(int i);
wxTextCtrl& operator<<(long i);
wxTextCtrl& operator<<(float f);
wxTextCtrl& operator<<(double d);
wxTextCtrl& operator<<(const char c);
virtual bool LoadFile(const wxString& file);
virtual bool SaveFile(const wxString& file);
virtual void WriteText(const wxString& text);
virtual void DiscardEdits(void);
virtual bool IsModified(void) const;
virtual void DiscardEdits();
virtual bool IsModified() const;
#if WXWIN_COMPATIBILITY
inline bool Modified(void) const { return IsModified(); }
inline bool Modified() const { return IsModified(); }
#endif
virtual long XYToPosition(long x, long y) const ;
virtual void PositionToXY(long pos, long *x, long *y) const ;
virtual void ShowPosition(long pos);
virtual int GetLineLength(long lineNo) const ;
virtual wxString GetLineText(long lineNo) const ;
virtual int GetNumberOfLines(void) const ;
virtual void Clear(void);
// Process special keys e.g. 'enter' and process as if it were a command, if required
void OnChar(wxKeyEvent& event);
virtual void Clear();
// callbacks
// ---------
void OnDropFiles(wxDropFilesEvent& event);
void OnChar(wxKeyEvent& event); // Process 'enter' if required
void OnEraseBackground(wxEraseEvent& event);
// Implementation
// --------------
virtual void Command(wxCommandEvent& event);
virtual bool MSWCommand(WXUINT param, WXWORD id);
inline bool IsRich(void) { return m_isRich; }
inline bool IsRich() const { return m_isRich; }
inline void SetRichEdit(bool isRich) { m_isRich = isRich; }
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
virtual void AdoptAttributesFromHWND(void);
virtual void SetupColours(void);
WXUINT message, WXWPARAM wParam,
WXLPARAM lParam);
virtual void AdoptAttributesFromHWND();
virtual void SetupColours();
virtual long MSWGetDlgCode();
protected:
bool m_isRich; // Are we using rich text edit to implement this?
DECLARE_EVENT_TABLE()
bool m_isRich; // Are we using rich text edit to implement this?
wxString fileName;
DECLARE_EVENT_TABLE()
};
#endif

View File

@@ -95,7 +95,7 @@ public:
int m_children;
long m_data;
wxTreeItem(void);
wxTreeItem();
// Accessors
inline long GetMask() const { return m_mask; }
@@ -110,7 +110,7 @@ public:
inline void SetMask(long mask) { m_mask = mask; }
inline void SetItemId(long id) { m_itemId = m_itemId = id; }
inline void GetState(long state) { m_state = state; }
inline void SetState(long state) { m_state = state; }
inline void SetStateMask(long stateMask) { m_stateMask = stateMask; }
inline void GetText(const wxString& text) { m_text = text; }
inline void SetImage(int image) { m_image = image; }
@@ -121,85 +121,121 @@ public:
class WXDLLEXPORT wxTreeCtrl: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxTreeCtrl)
public:
/*
* Public interface
*/
public:
/*
* Public interface
*/
// creation
// --------
wxTreeCtrl();
inline wxTreeCtrl(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = "wxTreeCtrl")
{
Create(parent, id, pos, size, style, validator, name);
}
~wxTreeCtrl();
bool Create(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = "wxTreeCtrl");
// accessors
// ---------
//
int GetCount() const;
wxTreeCtrl(void);
// indent
int GetIndent() const;
void SetIndent(int indent);
// image list
wxImageList *GetImageList(int which = wxIMAGE_LIST_NORMAL) const;
void SetImageList(wxImageList *imageList, int which = wxIMAGE_LIST_NORMAL);
inline wxTreeCtrl(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = "wxTreeCtrl")
{
Create(parent, id, pos, size, style, validator, name);
}
~wxTreeCtrl(void);
// navigation inside the tree
long GetNextItem(long item, int code) const;
bool ItemHasChildren(long item) const;
long GetChild(long item) const;
long GetParent(long item) const;
long GetFirstVisibleItem() const;
long GetNextVisibleItem(long item) const;
long GetSelection() const;
long GetRootItem() const;
bool Create(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = "wxTreeCtrl");
// generic function for (g|s)etting item attributes
bool GetItem(wxTreeItem& info) const;
bool SetItem(wxTreeItem& info);
// item state
int GetItemState(long item, long stateMask) const;
bool SetItemState(long item, long state, long stateMask);
// item image
bool SetItemImage(long item, int image, int selImage);
// item text
wxString GetItemText(long item) const;
void SetItemText(long item, const wxString& str);
// custom data associated with the item
long GetItemData(long item) const;
bool SetItemData(long item, long data);
// convenience function
bool IsItemExpanded(long item)
{
return (GetItemState(item, wxTREE_STATE_EXPANDED) &
wxTREE_STATE_EXPANDED) != 0;
}
// Attributes
int GetCount(void) const ;
int GetIndent(void) const ;
void SetIndent(int indent) ;
wxImageList *GetImageList(int which = wxIMAGE_LIST_NORMAL) const ;
void SetImageList(wxImageList *imageList, int which = wxIMAGE_LIST_NORMAL) ;
long GetNextItem(long item, int code) const ;
bool ItemHasChildren(long item) const ;
long GetChild(long item) const ;
long GetParent(long item) const ;
long GetFirstVisibleItem(void) const ;
long GetNextVisibleItem(long item) const ;
long GetSelection(void) const ;
long GetRootItem(void) const ;
bool GetItem(wxTreeItem& info) const ;
bool SetItem(wxTreeItem& info) ;
int GetItemState(long item, long stateMask) const ;
bool SetItemState(long item, long state, long stateMask) ;
bool SetItemImage(long item, int image, int selImage) ;
wxString GetItemText(long item) const ;
void SetItemText(long item, const wxString& str) ;
long GetItemData(long item) const ;
bool SetItemData(long item, long data) ;
bool GetItemRect(long item, wxRectangle& rect, bool textOnly = FALSE) const;
wxTextCtrl& GetEditControl(void) const;
// Operations
bool DeleteItem(long item);
bool ExpandItem(long item, int action);
long InsertItem(long parent, wxTreeItem& info, long insertAfter = wxTREE_INSERT_LAST);
// If image > -1 and selImage == -1, the same image is used for
// both selected and unselected items.
long InsertItem(long parent, const wxString& label, int image = -1, int selImage = -1, long insertAfter = wxTREE_INSERT_LAST);
bool SelectItem(long item);
bool ScrollTo(long item);
bool DeleteAllItems(void) ;
wxTextCtrl& Edit(long item) ;
long HitTest(const wxPoint& point, int& flags);
// wxImageList *CreateDragImage(long item) ;
bool SortChildren(long item) ;
bool EnsureVisible(long item) ;
void Command(wxCommandEvent& event) { ProcessCommand(event); };
// IMPLEMENTATION
bool MSWCommand(WXUINT param, WXWORD id);
bool MSWNotify(WXWPARAM wParam, WXLPARAM lParam);
// bounding rect
bool GetItemRect(long item, wxRectangle& rect, bool textOnly = FALSE) const;
//
wxTextCtrl& GetEditControl() const;
// operations
// ----------
// adding/deleting items
bool DeleteItem(long item);
long InsertItem(long parent, wxTreeItem& info,
long insertAfter = wxTREE_INSERT_LAST);
// If image > -1 and selImage == -1, the same image is used for
// both selected and unselected items.
long InsertItem(long parent, const wxString& label,
int image = -1, int selImage = -1,
long insertAfter = wxTREE_INSERT_LAST);
// changing item state
bool ExpandItem(long item) { return ExpandItem(item, wxTREE_EXPAND_EXPAND); }
bool CollapseItem(long item) { return ExpandItem(item, wxTREE_EXPAND_COLLAPSE); }
bool ToggleItem(long item) { return ExpandItem(item, wxTREE_EXPAND_TOGGLE); }
// common interface for {Expand|Collapse|Toggle}Item
bool ExpandItem(long item, int action);
//
bool SelectItem(long item);
bool ScrollTo(long item);
bool DeleteAllItems();
wxTextCtrl& Edit(long item);
long HitTest(const wxPoint& point, int& flags);
// wxImageList *CreateDragImage(long item);
bool SortChildren(long item);
bool EnsureVisible(long item);
// IMPLEMENTATION
void Command(wxCommandEvent& event) { ProcessCommand(event); };
bool MSWCommand(WXUINT param, WXWORD id);
bool MSWNotify(WXWPARAM wParam, WXLPARAM lParam);
protected:
wxTextCtrl m_textCtrl;
wxImageList *m_imageListNormal;
wxImageList *m_imageListState;
wxTextCtrl m_textCtrl;
wxImageList *m_imageListNormal;
wxImageList *m_imageListState;
DECLARE_DYNAMIC_CLASS(wxTreeCtrl)
};
/*
@@ -212,6 +248,8 @@ protected:
wxEVT_COMMAND_TREE_SET_INFO,
wxEVT_COMMAND_TREE_ITEM_EXPANDED,
wxEVT_COMMAND_TREE_ITEM_EXPANDING,
wxEVT_COMMAND_TREE_ITEM_COLLAPSED,
wxEVT_COMMAND_TREE_ITEM_COLLAPSING,
wxEVT_COMMAND_TREE_SEL_CHANGED,
wxEVT_COMMAND_TREE_SEL_CHANGING,
wxEVT_COMMAND_TREE_KEY_DOWN
@@ -246,6 +284,8 @@ typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&);
#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },

View File

@@ -386,7 +386,6 @@ public:
// Do Update UI processing for controls
void UpdateWindowUI(void);
void OnSize(wxSizeEvent& event);
void OnEraseBackground(wxEraseEvent& event);
void OnChar(wxKeyEvent& event);
void OnPaint(wxPaintEvent& event);

View File

@@ -1,11 +1,11 @@
#ifndef __NOTEBOOKH_BASE__
#define __NOTEBOOKH_BASE__
#if defined(__WINDOWS__)
#if defined(__WXMSW__)
#include "wx/msw/notebook.h"
#elif defined(__MOTIF__)
#elif defined(__WXMOTIF__)
#error "wxNotebook not implemented under Motif"
#elif defined(__GTK__)
#elif defined(__WXGTK__)
#include "wx/gtk/notebook.h"
#endif

View File

@@ -206,7 +206,7 @@ class WXDLLEXPORT wxObject
bool IsKindOf(wxClassInfo *info);
#if DEBUG && USE_MEMORY_TRACING
#if WXDEBUG && USE_MEMORY_TRACING
void * operator new (size_t size, char * fileName = NULL, int lineNum = 0);
void operator delete (void * buf);
@@ -218,7 +218,7 @@ class WXDLLEXPORT wxObject
#endif
#if DEBUG || USE_DEBUG_CONTEXT
#if WXDEBUG || USE_DEBUG_CONTEXT
virtual void Dump(ostream& str);
#endif
@@ -256,7 +256,7 @@ private:
int m_count;
};
#if DEBUG && USE_GLOBAL_MEMORY_OPERATORS
#if WXDEBUG && USE_GLOBAL_MEMORY_OPERATORS
#ifndef WXDEBUG_NEW
#define WXDEBUG_NEW new(__FILE__,__LINE__)
#endif

Some files were not shown because too many files have changed in this diff Show More