Compare commits

..

75 Commits

Author SHA1 Message Date
Bryan Petty
9454cbb281 This commit was manufactured by cvs2svn to create tag
'BEFORE_WIN16_REMOVAL'.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/BEFORE_WIN16_REMOVAL@26422 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-28 07:30:01 +00:00
Stefan Csomor
c40f44babb visibility changed code fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-28 07:30:01 +00:00
Stefan Csomor
39a7aa0467 mouse handling fixed, skipping if we have no native control handling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26420 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-28 07:18:48 +00:00
Stefan Csomor
d3e780ecdf extending calculation of visible region
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-28 07:06:27 +00:00
Stefan Csomor
e40f15abf3 typo in mouse event handler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-28 07:06:09 +00:00
Stefan Csomor
eed9e47912 showing a bevel button for a multiline label (is not multline on the OS level, but shows a different button type)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26417 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-28 07:05:51 +00:00
David Elliott
cd70b968e7 Removed extraneous m_items (the real one is in wxMenuBase)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-28 04:35:52 +00:00
Vadim Zeitlin
a63d48fa13 use best size instead of hard coded 80*26 in SetSize(wxSIZE_AUTO)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 20:46:58 +00:00
Vadim Zeitlin
0efd57325c just an unused var warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 20:06:36 +00:00
Vadim Zeitlin
c847adaacf printf() format mismatch warning fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26413 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 14:38:27 +00:00
Stefan Csomor
0b0efa9a67 corrected Info.plist.in location
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 12:14:34 +00:00
Stefan Csomor
1346242154 corrected Info.plist.in location
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 10:54:30 +00:00
Stefan Csomor
0b9d77cef7 corrected Info.plist.in location
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 10:38:21 +00:00
Stefan Csomor
3083eb85df moving GUI function to proper place
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 09:56:36 +00:00
Stefan Csomor
facd676487 new control based view architecture
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 09:44:31 +00:00
Stefan Csomor
f89d65ea8d mac fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 08:51:10 +00:00
Stefan Csomor
a848cd7e10 corrected binhex commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 08:44:55 +00:00
Stefan Csomor
b5c3e56ddc proper theme fonts
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 08:29:51 +00:00
Stefan Csomor
894406521a make construct simpler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 08:22:16 +00:00
Stefan Csomor
e11d436ba0 merge of new wxMac code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 08:11:05 +00:00
Stefan Csomor
4f30545658 merge of new wxMac code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 07:15:02 +00:00
Stefan Csomor
34a336adb6 type safe proxy typedefs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 06:47:41 +00:00
Stefan Csomor
f194560ed8 make things simpler, no default variant
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 06:43:09 +00:00
Stefan Csomor
5d7fe188ad macos native debug levels
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26399 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 06:40:58 +00:00
Stefan Csomor
fe3edc0e3f workaround to get things compiling properly under CW 8.3 Mach-O
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 05:39:00 +00:00
Stefan Csomor
0047cda214 NO_BORDER support backported into carbon subdir
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 05:37:31 +00:00
Stefan Csomor
3fd35d583b export var that is sought for afterwards from shared lib
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 05:36:20 +00:00
Stefan Csomor
aac04facff compiler warning fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 05:34:37 +00:00
Stefan Csomor
bf0f6c9420 get keys support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 05:33:46 +00:00
Stefan Csomor
97e324eff0 unicode support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 05:32:52 +00:00
Stefan Csomor
da6a5fe2cf mach-o shared libs support for cw
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 05:27:48 +00:00
Stefan Csomor
d9692c12b2 defines necessary for unicode support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 05:26:42 +00:00
Robin Dunn
52df3d15d8 typo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 04:51:35 +00:00
Robin Dunn
80625543f5 Fixed the readme
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26388 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-27 01:37:02 +00:00
Robin Dunn
29bfe46b43 Some more explainations in places, typos fixed, a little reorg, etc.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 23:13:47 +00:00
Robin Dunn
7599afcd67 typo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 22:33:20 +00:00
Robin Dunn
368d20e8be Regenerated metadata
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 22:16:25 +00:00
Robin Dunn
e029dde795 Turn off the RefDoc for constructors of the classes that have a
RefDoc.  This prevents the doc from being duplicated in the metadata.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 22:15:23 +00:00
Robin Dunn
3be10a9b0a Removed some old, outdated, unfinished, or unstarted docs and the
samples that go with them.  These can be added back later if somebody
wants to work on them again.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 21:56:14 +00:00
Vadim Zeitlin
c96f9d2162 don't set wxMenu::m_menuBar when appending the menu to menubar as otherwise an assert happens in the base class Attach()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 21:33:15 +00:00
Robin Dunn
60e424abd6 Updated version number
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 21:28:21 +00:00
Robin Dunn
90805926b7 Other doc updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 21:27:23 +00:00
Robin Dunn
5444f3a944 Removed some old, outdated, unfinished, or unstarted docs and the
samples that go with them.  These can be added back later if somebody
wants to work on them again.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 21:26:28 +00:00
Robin Dunn
625a9dc666 Removed some old, outdated, unfinished, or unstarted docs and the
samples that go with them.  These can be added back later if somebody
wants to work on them again.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 21:25:58 +00:00
David Elliott
1ee4156aae Add support for checked and radio menu items
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26377 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 21:16:49 +00:00
David Elliott
982fc42718 Implement SetBitmaps()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26376 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 20:59:06 +00:00
David Elliott
e03a77c6be * Add a comment to Enable() indicating that it is properly implemented
* Implement SetText()


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26375 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 20:49:40 +00:00
Stefan Csomor
038bf94732 files of wxMac moved into carbon subdirs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26374 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 20:46:31 +00:00
David Elliott
67352554ff Create real separator items instead of items without titles
(NOTE: Use diff -w to see what this really changes)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 20:37:27 +00:00
Stefan Csomor
461bdfcc1d files of wxMac moved into carbon subdirs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 20:30:58 +00:00
Stefan Csomor
aa58be5a51 files of wxMac moved into carbon subdirs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26371 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 20:21:29 +00:00
Robin Dunn
d00d1b8818 reSWIGged
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26370 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 19:37:03 +00:00
Stefan Csomor
2f10ebaced files of wxMac moved into carbon subdirs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26369 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 19:35:25 +00:00
Robin Dunn
68ff6404bb An icon for the doc viewer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26368 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 19:31:17 +00:00
Robin Dunn
31fbbf7871 tweak line number size just a bit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26367 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 19:26:34 +00:00
Stefan Csomor
fbdd484264 files of wxMac moved into carbon subdirs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26366 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 19:24:12 +00:00
Robin Dunn
bb1cf3d151 *** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26365 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 19:24:11 +00:00
Robin Dunn
664f7b63cd no need to delete these anymore (since they don't exist ;-) )
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 19:23:01 +00:00
Robin Dunn
3762cd671b forgot a bit of cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 19:20:13 +00:00
Robin Dunn
66394199cf Docsrings for wxSplitterWindow
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 19:17:29 +00:00
Stefan Csomor
56bb4a5ed8 files of wxMac moved into carbon subdirs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 16:52:25 +00:00
Stefan Csomor
7832590915 added Mach-O shared library targets
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 15:20:50 +00:00
Stefan Csomor
d476684f10 added Mach-O shared library targets
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26359 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 15:11:58 +00:00
Julian Smart
a3c4cee78f Documented UpdateSize function
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 11:57:16 +00:00
Stefan Csomor
3ea7a0a8dd classic split, building from the files in the src/mac/classic folder
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26357 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 06:56:52 +00:00
Stefan Csomor
9ea759d449 dispatch for header files in order to keep old way of includes working
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 06:28:38 +00:00
Stefan Csomor
b3c35859d8 workaround for bug in CW MSL
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 06:23:28 +00:00
Robin Dunn
f93cfdc363 Test the location of the .zips for writability, since the indexes are
cached there.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 05:32:40 +00:00
Robin Dunn
dcb1fb696c Make an app bundle for the doc viewer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 05:31:31 +00:00
David Elliott
9556c0f1b3 Create(): use wxAutoNSAutoreleasePool
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26352 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 03:15:27 +00:00
David Elliott
96c0183f31 Make wxCocoa work with wxUSE_STL==1: Use Erase instead of DeleteNode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26351 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 03:14:16 +00:00
David Elliott
7ce8248bc6 Make wxCocoa work with wxUSE_STL==1:
Use compatibility_iterator instead of Node and Erase instead of DeleteNode


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 03:11:51 +00:00
Robin Dunn
4263de1e05 Add a set for wxMac too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 01:03:11 +00:00
Robin Dunn
99b486ab37 Better font selection and sizes for wxGTK2, tweaked call tip colors
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 00:24:02 +00:00
Robin Dunn
b098694cb7 Fixes and updates for the activex module info.
Mention config.py change


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-26 00:23:15 +00:00
662 changed files with 132819 additions and 42181 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -105,18 +105,18 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
</set>
<set var="BASE_MAC_SRC" hints="files">
src/mac/dirmac.cpp
src/mac/mimetmac.cpp
src/mac/carbon/dirmac.cpp
src/mac/carbon/mimetmac.cpp
src/unix/baseunix.cpp
src/mac/utilsexc.cpp
src/mac/thread.cpp
src/mac/macnotfy.cpp
src/mac/morefilex/MoreFilesX.c
src/mac/carbon/utilsexc.cpp
src/mac/carbon/thread.cpp
src/mac/carbon/macnotfy.cpp
src/mac/carbon/morefilex/MoreFilesX.c
</set>
<set var="BASE_AND_GUI_MAC_SRC" hints="files">
src/mac/utils.cpp
src/mac/uma.cpp
src/mac/carbon/utils.cpp
src/mac/carbon/uma.cpp
</set>
<set var="BASE_MAC_HDR" hints="files">
@@ -1526,77 +1526,77 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
<set var="MAC_LOWLEVEL_HDR" hints="files">
</set>
<set var="MAC_SRC" hints="files">
src/mac/accel.cpp
src/mac/aga.cpp
src/mac/app.cpp
src/mac/bitmap.cpp
src/mac/bmpbuttn.cpp
src/mac/brush.cpp
src/mac/button.cpp
src/mac/checkbox.cpp
src/mac/checklst.cpp
src/mac/choice.cpp
src/mac/clipbrd.cpp
src/mac/colordlg.cpp
src/mac/colour.cpp
src/mac/combobox.cpp
src/mac/control.cpp
src/mac/cursor.cpp
src/mac/data.cpp
src/mac/dataobj.cpp
src/mac/dc.cpp
src/mac/dcclient.cpp
src/mac/dcmemory.cpp
src/mac/dcprint.cpp
src/mac/dcscreen.cpp
src/mac/dialog.cpp
src/mac/dirdlg.cpp
src/mac/display.cpp
src/mac/dnd.cpp
src/mac/filedlg.cpp
src/mac/font.cpp
src/mac/fontdlg.cpp
src/mac/fontenum.cpp
src/mac/fontutil.cpp
src/mac/frame.cpp
src/mac/gauge.cpp
src/mac/gdiobj.cpp
src/mac/gsockosx.c
src/mac/icon.cpp
src/mac/listbox.cpp
src/mac/mdi.cpp
src/mac/menu.cpp
src/mac/menuitem.cpp
src/mac/metafile.cpp
src/mac/minifram.cpp
src/mac/msgdlg.cpp
src/mac/notebmac.cpp
src/mac/palette.cpp
src/mac/pen.cpp
src/mac/pnghand.cpp
src/mac/printdlg.cpp
src/mac/printmac.cpp
src/mac/radiobox.cpp
src/mac/radiobut.cpp
src/mac/region.cpp
src/mac/renderer.cpp
src/mac/scrolbar.cpp
src/mac/settings.cpp
src/mac/slider.cpp
src/mac/spinbutt.cpp
src/mac/statbmp.cpp
src/mac/statbox.cpp
src/mac/statbrma.cpp
src/mac/statlmac.cpp
src/mac/stattext.cpp
src/mac/tabctrl.cpp
src/mac/textctrl.cpp
src/mac/timer.cpp
src/mac/tglbtn.cpp
src/mac/toolbar.cpp
src/mac/tooltip.cpp
src/mac/toplevel.cpp
src/mac/window.cpp
src/mac/carbon/accel.cpp
src/mac/carbon/aga.cpp
src/mac/carbon/app.cpp
src/mac/carbon/bitmap.cpp
src/mac/carbon/bmpbuttn.cpp
src/mac/carbon/brush.cpp
src/mac/carbon/button.cpp
src/mac/carbon/checkbox.cpp
src/mac/carbon/checklst.cpp
src/mac/carbon/choice.cpp
src/mac/carbon/clipbrd.cpp
src/mac/carbon/colordlg.cpp
src/mac/carbon/colour.cpp
src/mac/carbon/combobox.cpp
src/mac/carbon/control.cpp
src/mac/carbon/cursor.cpp
src/mac/carbon/data.cpp
src/mac/carbon/dataobj.cpp
src/mac/carbon/dc.cpp
src/mac/carbon/dcclient.cpp
src/mac/carbon/dcmemory.cpp
src/mac/carbon/dcprint.cpp
src/mac/carbon/dcscreen.cpp
src/mac/carbon/dialog.cpp
src/mac/carbon/dirdlg.cpp
src/mac/carbon/display.cpp
src/mac/carbon/dnd.cpp
src/mac/carbon/filedlg.cpp
src/mac/carbon/font.cpp
src/mac/carbon/fontdlg.cpp
src/mac/carbon/fontenum.cpp
src/mac/carbon/fontutil.cpp
src/mac/carbon/frame.cpp
src/mac/carbon/gauge.cpp
src/mac/carbon/gdiobj.cpp
src/mac/carbon/gsockosx.c
src/mac/carbon/icon.cpp
src/mac/carbon/listbox.cpp
src/mac/carbon/mdi.cpp
src/mac/carbon/menu.cpp
src/mac/carbon/menuitem.cpp
src/mac/carbon/metafile.cpp
src/mac/carbon/minifram.cpp
src/mac/carbon/msgdlg.cpp
src/mac/carbon/notebmac.cpp
src/mac/carbon/palette.cpp
src/mac/carbon/pen.cpp
src/mac/carbon/pnghand.cpp
src/mac/carbon/printdlg.cpp
src/mac/carbon/printmac.cpp
src/mac/carbon/radiobox.cpp
src/mac/carbon/radiobut.cpp
src/mac/carbon/region.cpp
src/mac/carbon/renderer.cpp
src/mac/carbon/scrolbar.cpp
src/mac/carbon/settings.cpp
src/mac/carbon/slider.cpp
src/mac/carbon/spinbutt.cpp
src/mac/carbon/statbmp.cpp
src/mac/carbon/statbox.cpp
src/mac/carbon/statbrma.cpp
src/mac/carbon/statlmac.cpp
src/mac/carbon/stattext.cpp
src/mac/carbon/tabctrl.cpp
src/mac/carbon/textctrl.cpp
src/mac/carbon/timer.cpp
src/mac/carbon/tglbtn.cpp
src/mac/carbon/toolbar.cpp
src/mac/carbon/tooltip.cpp
src/mac/carbon/toplevel.cpp
src/mac/carbon/window.cpp
<!-- Generic implementations used by wxMac: -->
src/generic/caret.cpp
src/generic/fdrepdlg.cpp
@@ -1610,86 +1610,86 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/unix/snglinst.cpp
</set>
<set var="MAC_HDR" hints="files">
wx/mac/accel.h
wx/mac/aga.h
wx/mac/app.h
wx/mac/bitmap.h
wx/mac/bmpbuttn.h
wx/mac/brush.h
wx/mac/button.h
wx/mac/checkbox.h
wx/mac/checklst.h
wx/mac/chkconf.h
wx/mac/choice.h
wx/mac/clipbrd.h
wx/mac/colordlg.h
wx/mac/colour.h
wx/mac/combobox.h
wx/mac/control.h
wx/mac/cursor.h
wx/mac/dataform.h
wx/mac/dataobj.h
wx/mac/dataobj2.h
wx/mac/dc.h
wx/mac/dcclient.h
wx/mac/dcmemory.h
wx/mac/dcprint.h
wx/mac/dcscreen.h
wx/mac/dialog.h
wx/mac/dirdlg.h
wx/mac/display.h
wx/mac/dnd.h
wx/mac/filedlg.h
wx/mac/font.h
wx/mac/fontdlg.h
wx/mac/frame.h
wx/mac/gauge.h
wx/mac/gdiobj.h
wx/mac/gsockmac.h
wx/mac/helpxxxx.h
wx/mac/icon.h
wx/mac/imaglist.h
wx/mac/listbox.h
wx/mac/listctrl.h
wx/mac/macnotfy.h
wx/mac/macsock.h
wx/mac/mdi.h
wx/mac/menu.h
wx/mac/menuitem.h
wx/mac/metafile.h
wx/mac/mimetype.h
wx/mac/minifram.h
wx/mac/msgdlg.h
wx/mac/notebook.h
wx/mac/palette.h
wx/mac/pen.h
wx/mac/pnghand.h
wx/mac/pngread.h
wx/mac/printdlg.h
wx/mac/printmac.h
wx/mac/private.h
wx/mac/radiobox.h
wx/mac/radiobut.h
wx/mac/region.h
wx/mac/scrolbar.h
wx/mac/slider.h
wx/mac/spinbutt.h
wx/mac/spinctrl.h
wx/mac/statbmp.h
wx/mac/statbox.h
wx/mac/statline.h
wx/mac/stattext.h
wx/mac/statusbr.h
wx/mac/tabctrl.h
wx/mac/textctrl.h
wx/mac/timer.h
wx/mac/tglbtn.h
wx/mac/toolbar.h
wx/mac/tooltip.h
wx/mac/toplevel.h
wx/mac/treectrl.h
wx/mac/uma.h
wx/mac/window.h
wx/mac/carbon/accel.h
wx/mac/carbon/aga.h
wx/mac/carbon/app.h
wx/mac/carbon/bitmap.h
wx/mac/carbon/bmpbuttn.h
wx/mac/carbon/brush.h
wx/mac/carbon/button.h
wx/mac/carbon/checkbox.h
wx/mac/carbon/checklst.h
wx/mac/carbon/chkconf.h
wx/mac/carbon/choice.h
wx/mac/carbon/clipbrd.h
wx/mac/carbon/colordlg.h
wx/mac/carbon/colour.h
wx/mac/carbon/combobox.h
wx/mac/carbon/control.h
wx/mac/carbon/cursor.h
wx/mac/carbon/dataform.h
wx/mac/carbon/dataobj.h
wx/mac/carbon/dataobj2.h
wx/mac/carbon/dc.h
wx/mac/carbon/dcclient.h
wx/mac/carbon/dcmemory.h
wx/mac/carbon/dcprint.h
wx/mac/carbon/dcscreen.h
wx/mac/carbon/dialog.h
wx/mac/carbon/dirdlg.h
wx/mac/carbon/display.h
wx/mac/carbon/dnd.h
wx/mac/carbon/filedlg.h
wx/mac/carbon/font.h
wx/mac/carbon/fontdlg.h
wx/mac/carbon/frame.h
wx/mac/carbon/gauge.h
wx/mac/carbon/gdiobj.h
wx/mac/carbon/gsockmac.h
wx/mac/carbon/helpxxxx.h
wx/mac/carbon/icon.h
wx/mac/carbon/imaglist.h
wx/mac/carbon/listbox.h
wx/mac/carbon/listctrl.h
wx/mac/carbon/macnotfy.h
wx/mac/carbon/macsock.h
wx/mac/carbon/mdi.h
wx/mac/carbon/menu.h
wx/mac/carbon/menuitem.h
wx/mac/carbon/metafile.h
wx/mac/carbon/mimetype.h
wx/mac/carbon/minifram.h
wx/mac/carbon/msgdlg.h
wx/mac/carbon/notebook.h
wx/mac/carbon/palette.h
wx/mac/carbon/pen.h
wx/mac/carbon/pnghand.h
wx/mac/carbon/pngread.h
wx/mac/carbon/printdlg.h
wx/mac/carbon/printmac.h
wx/mac/carbon/private.h
wx/mac/carbon/radiobox.h
wx/mac/carbon/radiobut.h
wx/mac/carbon/region.h
wx/mac/carbon/scrolbar.h
wx/mac/carbon/slider.h
wx/mac/carbon/spinbutt.h
wx/mac/carbon/spinctrl.h
wx/mac/carbon/statbmp.h
wx/mac/carbon/statbox.h
wx/mac/carbon/statline.h
wx/mac/carbon/stattext.h
wx/mac/carbon/statusbr.h
wx/mac/carbon/tabctrl.h
wx/mac/carbon/textctrl.h
wx/mac/carbon/timer.h
wx/mac/carbon/tglbtn.h
wx/mac/carbon/toolbar.h
wx/mac/carbon/tooltip.h
wx/mac/carbon/toplevel.h
wx/mac/carbon/treectrl.h
wx/mac/carbon/uma.h
wx/mac/carbon/window.h
<!-- Generic implementations used by wxMac: -->
wx/generic/caret.h
wx/generic/fdrepdlg.h
@@ -1787,7 +1787,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/generic/tabg.cpp
src/generic/timer.cpp
<!-- wxMac stuff used by wxCocoa: -->
src/mac/gsockosx.c
src/mac/carbon/gsockosx.c
</set>
<set var="COCOA_HDR" hints="files">
wx/cocoa/NSApplication.h
@@ -2023,12 +2023,12 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
</set>
<set var="ADVANCED_MAC_SRC" hints="files">
src/mac/joystick.cpp
src/mac/sound.cpp
src/mac/carbon/joystick.cpp
src/mac/carbon/sound.cpp
</set>
<set var="ADVANCED_MAC_HDR" hints="files">
wx/mac/joystick.h
wx/mac/sound.h
wx/mac/carbon/joystick.h
wx/mac/carbon/sound.h
</set>
<set var="ADVANCED_OS2_SRC" hints="files">
@@ -2134,7 +2134,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
<!-- ====================================================================== -->
<set var="OPENGL_SRC" hints="files">
<if cond="TOOLKIT=='MAC'">src/mac/glcanvas.cpp</if>
<if cond="TOOLKIT=='MAC'">src/mac/carbon/glcanvas.cpp</if>
<if cond="TOOLKIT=='GTK'">src/gtk/glcanvas.cpp</if>
<if cond="TOOLKIT=='MSW'">src/msw/glcanvas.cpp</if>
<if cond="TOOLKIT=='MOTIF'">src/x11/glcanvas.cpp</if>
@@ -2143,7 +2143,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
</set>
<set var="OPENGL_HDR" hints="files">
<if cond="TOOLKIT=='MAC'">wx/mac/glcanvas.h</if>
<if cond="TOOLKIT=='MAC'">wx/mac/carbon/glcanvas.h</if>
<if cond="TOOLKIT=='GTK'">wx/gtk/glcanvas.h</if>
<if cond="TOOLKIT=='MSW'">wx/msw/glcanvas.h</if>
<if cond="TOOLKIT=='MOTIF'">wx/x11/glcanvas.h</if>

View File

@@ -16,13 +16,13 @@
</set>
<set var="BUNDLE_PLIST">
$(TOP_SRCDIR)src/mac/Info.plist.in
$(TOP_SRCDIR)src/mac/carbon/Info.plist.in
</set>
<set var="BUNDLE_RESOURCE">
$(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).$(WXSOVERSION[0]).rsrc
</set>
<set var="BUNDLE_ICONS">
$(TOP_SRCDIR)src/mac/wxmac.icns
$(TOP_SRCDIR)src/mac/carbon/wxmac.icns
</set>
<define-tag name="wx-mac-app-bundle" rules="exe">

View File

@@ -257,16 +257,27 @@ MOTIF_DIST: ALL_GUI_DIST
MACX_DIST: ALL_GUI_DIST
cp $(INCDIR)/*.* $(DISTDIR)/include
mkdir $(DISTDIR)/include/wx/mac/carbon
mkdir $(DISTDIR)/include/wx/mac/private
mkdir $(DISTDIR)/include/wx/mac/carbon/private
cp $(INCDIR)/wx/mac/*.h $(DISTDIR)/include/wx/mac
cp $(MACDIR)/*.cpp $(DISTDIR)/src/mac
cp $(MACDIR)/*.c $(DISTDIR)/src/mac
cp $(MACDIR)/*.h $(DISTDIR)/src/mac
cp $(MACDIR)/*.r $(DISTDIR)/src/mac
mkdir $(DISTDIR)/src/mac/morefile
cp $(MACDIR)/morefile/*.h $(DISTDIR)/src/mac/morefile
cp $(MACDIR)/morefile/*.c $(DISTDIR)/src/mac/morefile
mkdir $(DISTDIR)/src/mac/macsock
cp $(MACDIR)/macsock/*.lib $(DISTDIR)/src/mac/macsock
cp $(INCDIR)/wx/mac/carbon/*.h $(DISTDIR)/include/wx/mac/carbon
cp $(INCDIR)/wx/mac/carbon/private/*.h $(DISTDIR)/include/wx/mac/carbon/private
cp $(INCDIR)/wx/mac/private/*.h $(DISTDIR)/include/wx/mac/private
cp $(MACDIR)/carbon/*.cpp $(DISTDIR)/src/mac/carbon
cp $(MACDIR)/carbon/*.c $(DISTDIR)/src/mac/carbon
cp $(MACDIR)/carbon/*.h $(DISTDIR)/src/mac/carbon
cp $(MACDIR)/carbon/*.r $(DISTDIR)/src/mac/carbon
mkdir $(DISTDIR)/src/mac/carbon/morefile
cp $(MACDIR)/carbon/morefile/*.h $(DISTDIR)/src/mac/carbon/morefile
cp $(MACDIR)/carbon/morefile/*.c $(DISTDIR)/src/mac/carbon/morefile
mkdir $(DISTDIR)/src/mac/carbon/morefilex
cp $(MACDIR)/carbon/morefilex/*.h $(DISTDIR)/src/mac/carbon/morefilex
cp $(MACDIR)/carbon/morefilex/*.c $(DISTDIR)/src/mac/carbon/morefilex
cp $(MACDIR)/carbon/morefilex/*.cpp $(DISTDIR)/src/mac/carbon/morefilex
# obsolete
# mkdir $(DISTDIR)/src/mac/macsock
# cp $(MACDIR)/macsock/*.lib $(DISTDIR)/src/mac/macsock
mkdir $(DISTDIR)/contrib
cp -R $(WXDIR)/contrib $(DISTDIR)

4
configure vendored
View File

@@ -26837,9 +26837,9 @@ echo "${ECHO_T}xlc" >&6
echo "${ECHO_T}none" >&6
fi
CPPFLAGS="$CPPFLAGS $CPPFLAGS_PASCAL -I\${top_srcdir}/src/mac/morefilex -I/Developer/Headers/FlatCarbon"
CPPFLAGS="$CPPFLAGS $CPPFLAGS_PASCAL -I\${top_srcdir}/src/mac/carbon/morefilex -I/Developer/Headers/FlatCarbon"
TOOLKIT_VPATH="\${top_srcdir}/src/mac${PATH_IFS}\${top_srcdir}/src/mac/morefilex"
TOOLKIT_VPATH="\${top_srcdir}/src/mac/carbon${PATH_IFS}\${top_srcdir}/src/mac/carbon/morefilex"
TOOLKIT=MAC
GUIDIST=MACX_DIST
WXBASEPORT="_carbon"

View File

@@ -2914,9 +2914,9 @@ equivalent variable and GTK+ is version 1.2.3 or above.
AC_MSG_RESULT([none])
fi
CPPFLAGS="$CPPFLAGS $CPPFLAGS_PASCAL -I\${top_srcdir}/src/mac/morefilex -I/Developer/Headers/FlatCarbon"
CPPFLAGS="$CPPFLAGS $CPPFLAGS_PASCAL -I\${top_srcdir}/src/mac/carbon/morefilex -I/Developer/Headers/FlatCarbon"
TOOLKIT_VPATH="\${top_srcdir}/src/mac${PATH_IFS}\${top_srcdir}/src/mac/morefilex"
TOOLKIT_VPATH="\${top_srcdir}/src/mac/carbon${PATH_IFS}\${top_srcdir}/src/mac/carbon/morefilex"
TOOLKIT=MAC
dnl we can't call this MAC_DIST or autoconf thinks its a macro
GUIDIST=MACX_DIST

View File

@@ -130,7 +130,7 @@ anitest$(EXEEXT): $(ANITEST_OBJECTS) $(__anitest___win32rc)
$(__anitest___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
anitest.app/Contents/PkgInfo: anitest$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
anitest.app/Contents/PkgInfo: anitest$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mkdir -p anitest.app/Contents
mkdir -p anitest.app/Contents/MacOS
mkdir -p anitest.app/Contents/Resources
@@ -139,7 +139,7 @@ anitest.app/Contents/PkgInfo: anitest$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/anitest/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/Info.plist.in >anitest.app/Contents/Info.plist
$(top_srcdir)/src/mac/carbon/Info.plist.in >anitest.app/Contents/Info.plist
echo -n "APPL????" >anitest.app/Contents/PkgInfo

View File

@@ -130,7 +130,7 @@ proplist$(EXEEXT): $(PROPLIST_OBJECTS) $(__proplist___win32rc)
$(__proplist___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
proplist.app/Contents/PkgInfo: proplist$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
proplist.app/Contents/PkgInfo: proplist$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mkdir -p proplist.app/Contents
mkdir -p proplist.app/Contents/MacOS
mkdir -p proplist.app/Contents/Resources
@@ -139,7 +139,7 @@ proplist.app/Contents/PkgInfo: proplist$(EXEEXT) $(top_srcdir)/src/mac/Info.plis
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/proplist/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/Info.plist.in >proplist.app/Contents/Info.plist
$(top_srcdir)/src/mac/carbon/Info.plist.in >proplist.app/Contents/Info.plist
echo -n "APPL????" >proplist.app/Contents/PkgInfo

View File

@@ -130,7 +130,7 @@ resource$(EXEEXT): $(RESOURCE_OBJECTS) $(__resource___win32rc)
$(__resource___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
resource.app/Contents/PkgInfo: resource$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
resource.app/Contents/PkgInfo: resource$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mkdir -p resource.app/Contents
mkdir -p resource.app/Contents/MacOS
mkdir -p resource.app/Contents/Resources
@@ -139,7 +139,7 @@ resource.app/Contents/PkgInfo: resource$(EXEEXT) $(top_srcdir)/src/mac/Info.plis
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/resource/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/Info.plist.in >resource.app/Contents/Info.plist
$(top_srcdir)/src/mac/carbon/Info.plist.in >resource.app/Contents/Info.plist
echo -n "APPL????" >resource.app/Contents/PkgInfo

View File

@@ -130,7 +130,7 @@ treelay$(EXEEXT): $(TREELAY_OBJECTS) $(__treelay___win32rc)
$(__treelay___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
treelay.app/Contents/PkgInfo: treelay$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
treelay.app/Contents/PkgInfo: treelay$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mkdir -p treelay.app/Contents
mkdir -p treelay.app/Contents/MacOS
mkdir -p treelay.app/Contents/Resources
@@ -139,7 +139,7 @@ treelay.app/Contents/PkgInfo: treelay$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/treelay/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/Info.plist.in >treelay.app/Contents/Info.plist
$(top_srcdir)/src/mac/carbon/Info.plist.in >treelay.app/Contents/Info.plist
echo -n "APPL????" >treelay.app/Contents/PkgInfo

View File

@@ -221,7 +221,7 @@ fl_demo1$(EXEEXT): $(FL_DEMO1_OBJECTS) $(__fl_demo1___win32rc)
$(__fl_demo1___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
fl_demo1.app/Contents/PkgInfo: fl_demo1$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
fl_demo1.app/Contents/PkgInfo: fl_demo1$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mkdir -p fl_demo1.app/Contents
mkdir -p fl_demo1.app/Contents/MacOS
mkdir -p fl_demo1.app/Contents/Resources
@@ -230,7 +230,7 @@ fl_demo1.app/Contents/PkgInfo: fl_demo1$(EXEEXT) $(top_srcdir)/src/mac/Info.plis
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/fl_demo1/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/Info.plist.in >fl_demo1.app/Contents/Info.plist
$(top_srcdir)/src/mac/carbon/Info.plist.in >fl_demo1.app/Contents/Info.plist
echo -n "APPL????" >fl_demo1.app/Contents/PkgInfo
@@ -251,7 +251,7 @@ fl_demo2$(EXEEXT): $(FL_DEMO2_OBJECTS) $(__fl_demo2___win32rc)
$(__fl_demo2___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
fl_demo2.app/Contents/PkgInfo: fl_demo2$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
fl_demo2.app/Contents/PkgInfo: fl_demo2$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mkdir -p fl_demo2.app/Contents
mkdir -p fl_demo2.app/Contents/MacOS
mkdir -p fl_demo2.app/Contents/Resources
@@ -260,7 +260,7 @@ fl_demo2.app/Contents/PkgInfo: fl_demo2$(EXEEXT) $(top_srcdir)/src/mac/Info.plis
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/fl_demo2/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/Info.plist.in >fl_demo2.app/Contents/Info.plist
$(top_srcdir)/src/mac/carbon/Info.plist.in >fl_demo2.app/Contents/Info.plist
echo -n "APPL????" >fl_demo2.app/Contents/PkgInfo
@@ -281,7 +281,7 @@ fl_sample1$(EXEEXT): $(FL_SAMPLE1_OBJECTS) $(__fl_sample1___win32rc)
$(__fl_sample1___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
fl_sample1.app/Contents/PkgInfo: fl_sample1$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
fl_sample1.app/Contents/PkgInfo: fl_sample1$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mkdir -p fl_sample1.app/Contents
mkdir -p fl_sample1.app/Contents/MacOS
mkdir -p fl_sample1.app/Contents/Resources
@@ -290,7 +290,7 @@ fl_sample1.app/Contents/PkgInfo: fl_sample1$(EXEEXT) $(top_srcdir)/src/mac/Info.
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/fl_sample1/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/Info.plist.in >fl_sample1.app/Contents/Info.plist
$(top_srcdir)/src/mac/carbon/Info.plist.in >fl_sample1.app/Contents/Info.plist
echo -n "APPL????" >fl_sample1.app/Contents/PkgInfo
@@ -311,7 +311,7 @@ fl_sample2$(EXEEXT): $(FL_SAMPLE2_OBJECTS) $(__fl_sample2___win32rc)
$(__fl_sample2___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
fl_sample2.app/Contents/PkgInfo: fl_sample2$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
fl_sample2.app/Contents/PkgInfo: fl_sample2$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mkdir -p fl_sample2.app/Contents
mkdir -p fl_sample2.app/Contents/MacOS
mkdir -p fl_sample2.app/Contents/Resources
@@ -320,7 +320,7 @@ fl_sample2.app/Contents/PkgInfo: fl_sample2$(EXEEXT) $(top_srcdir)/src/mac/Info.
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/fl_sample2/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/Info.plist.in >fl_sample2.app/Contents/Info.plist
$(top_srcdir)/src/mac/carbon/Info.plist.in >fl_sample2.app/Contents/Info.plist
echo -n "APPL????" >fl_sample2.app/Contents/PkgInfo
@@ -341,7 +341,7 @@ fl_sample3$(EXEEXT): $(FL_SAMPLE3_OBJECTS) $(__fl_sample3___win32rc)
$(__fl_sample3___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
fl_sample3.app/Contents/PkgInfo: fl_sample3$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
fl_sample3.app/Contents/PkgInfo: fl_sample3$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mkdir -p fl_sample3.app/Contents
mkdir -p fl_sample3.app/Contents/MacOS
mkdir -p fl_sample3.app/Contents/Resources
@@ -350,7 +350,7 @@ fl_sample3.app/Contents/PkgInfo: fl_sample3$(EXEEXT) $(top_srcdir)/src/mac/Info.
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/fl_sample3/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/Info.plist.in >fl_sample3.app/Contents/Info.plist
$(top_srcdir)/src/mac/carbon/Info.plist.in >fl_sample3.app/Contents/Info.plist
echo -n "APPL????" >fl_sample3.app/Contents/PkgInfo

View File

@@ -134,7 +134,7 @@ dynsash$(EXEEXT): $(DYNSASH_OBJECTS) $(__dynsash___win32rc)
$(__dynsash___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
dynsash.app/Contents/PkgInfo: dynsash$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
dynsash.app/Contents/PkgInfo: dynsash$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mkdir -p dynsash.app/Contents
mkdir -p dynsash.app/Contents/MacOS
mkdir -p dynsash.app/Contents/Resources
@@ -143,7 +143,7 @@ dynsash.app/Contents/PkgInfo: dynsash$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/dynsash/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/Info.plist.in >dynsash.app/Contents/Info.plist
$(top_srcdir)/src/mac/carbon/Info.plist.in >dynsash.app/Contents/Info.plist
echo -n "APPL????" >dynsash.app/Contents/PkgInfo

View File

@@ -134,7 +134,7 @@ dynsash_switch$(EXEEXT): $(DYNSASH_SWITCH_OBJECTS) $(__dynsash_switch___win32rc)
$(__dynsash_switch___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
dynsash_switch.app/Contents/PkgInfo: dynsash_switch$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
dynsash_switch.app/Contents/PkgInfo: dynsash_switch$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mkdir -p dynsash_switch.app/Contents
mkdir -p dynsash_switch.app/Contents/MacOS
mkdir -p dynsash_switch.app/Contents/Resources
@@ -143,7 +143,7 @@ dynsash_switch.app/Contents/PkgInfo: dynsash_switch$(EXEEXT) $(top_srcdir)/src/m
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/dynsash_switch/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/Info.plist.in >dynsash_switch.app/Contents/Info.plist
$(top_srcdir)/src/mac/carbon/Info.plist.in >dynsash_switch.app/Contents/Info.plist
echo -n "APPL????" >dynsash_switch.app/Contents/PkgInfo

View File

@@ -130,7 +130,7 @@ test$(EXEEXT): $(TEST_OBJECTS) $(__test___win32rc)
$(__test___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
test.app/Contents/PkgInfo: test$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
test.app/Contents/PkgInfo: test$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mkdir -p test.app/Contents
mkdir -p test.app/Contents/MacOS
mkdir -p test.app/Contents/Resources
@@ -139,7 +139,7 @@ test.app/Contents/PkgInfo: test$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(L
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/test/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/Info.plist.in >test.app/Contents/Info.plist
$(top_srcdir)/src/mac/carbon/Info.plist.in >test.app/Contents/Info.plist
echo -n "APPL????" >test.app/Contents/PkgInfo

View File

@@ -129,7 +129,7 @@ led$(EXEEXT): $(LED_OBJECTS) $(__led___win32rc)
$(__led___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
led.app/Contents/PkgInfo: led$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
led.app/Contents/PkgInfo: led$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mkdir -p led.app/Contents
mkdir -p led.app/Contents/MacOS
mkdir -p led.app/Contents/Resources
@@ -138,7 +138,7 @@ led.app/Contents/PkgInfo: led$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIB
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/led/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/Info.plist.in >led.app/Contents/Info.plist
$(top_srcdir)/src/mac/carbon/Info.plist.in >led.app/Contents/Info.plist
echo -n "APPL????" >led.app/Contents/PkgInfo

View File

@@ -130,7 +130,7 @@ mtest$(EXEEXT): $(MTEST_OBJECTS) $(__mtest___win32rc)
$(__mtest___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
mtest.app/Contents/PkgInfo: mtest$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mtest.app/Contents/PkgInfo: mtest$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mkdir -p mtest.app/Contents
mkdir -p mtest.app/Contents/MacOS
mkdir -p mtest.app/Contents/Resources
@@ -139,7 +139,7 @@ mtest.app/Contents/PkgInfo: mtest$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/mtest/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/Info.plist.in >mtest.app/Contents/Info.plist
$(top_srcdir)/src/mac/carbon/Info.plist.in >mtest.app/Contents/Info.plist
echo -n "APPL????" >mtest.app/Contents/PkgInfo

View File

@@ -130,7 +130,7 @@ splittree$(EXEEXT): $(SPLITTREE_OBJECTS) $(__splittree___win32rc)
$(__splittree___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
splittree.app/Contents/PkgInfo: splittree$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
splittree.app/Contents/PkgInfo: splittree$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mkdir -p splittree.app/Contents
mkdir -p splittree.app/Contents/MacOS
mkdir -p splittree.app/Contents/Resources
@@ -139,7 +139,7 @@ splittree.app/Contents/PkgInfo: splittree$(EXEEXT) $(top_srcdir)/src/mac/Info.pl
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/splittree/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/Info.plist.in >splittree.app/Contents/Info.plist
$(top_srcdir)/src/mac/carbon/Info.plist.in >splittree.app/Contents/Info.plist
echo -n "APPL????" >splittree.app/Contents/PkgInfo

View File

@@ -132,7 +132,7 @@ mmboard$(EXEEXT): $(MMBOARD_OBJECTS) $(__mmboard___win32rc)
$(__mmboard___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
mmboard.app/Contents/PkgInfo: mmboard$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mmboard.app/Contents/PkgInfo: mmboard$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mkdir -p mmboard.app/Contents
mkdir -p mmboard.app/Contents/MacOS
mkdir -p mmboard.app/Contents/Resources
@@ -141,7 +141,7 @@ mmboard.app/Contents/PkgInfo: mmboard$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/mmboard/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/Info.plist.in >mmboard.app/Contents/Info.plist
$(top_srcdir)/src/mac/carbon/Info.plist.in >mmboard.app/Contents/Info.plist
echo -n "APPL????" >mmboard.app/Contents/PkgInfo

View File

@@ -133,7 +133,7 @@ ogledit$(EXEEXT): $(OGLEDIT_OBJECTS) $(__ogledit___win32rc)
$(__ogledit___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
ogledit.app/Contents/PkgInfo: ogledit$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
ogledit.app/Contents/PkgInfo: ogledit$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mkdir -p ogledit.app/Contents
mkdir -p ogledit.app/Contents/MacOS
mkdir -p ogledit.app/Contents/Resources
@@ -142,7 +142,7 @@ ogledit.app/Contents/PkgInfo: ogledit$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/ogledit/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/Info.plist.in >ogledit.app/Contents/Info.plist
$(top_srcdir)/src/mac/carbon/Info.plist.in >ogledit.app/Contents/Info.plist
echo -n "APPL????" >ogledit.app/Contents/PkgInfo

View File

@@ -148,7 +148,7 @@ studio$(EXEEXT): $(STUDIO_OBJECTS) $(__studio___win32rc)
$(__studio___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
studio.app/Contents/PkgInfo: studio$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
studio.app/Contents/PkgInfo: studio$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mkdir -p studio.app/Contents
mkdir -p studio.app/Contents/MacOS
mkdir -p studio.app/Contents/Resources
@@ -157,7 +157,7 @@ studio.app/Contents/PkgInfo: studio$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/studio/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/Info.plist.in >studio.app/Contents/Info.plist
$(top_srcdir)/src/mac/carbon/Info.plist.in >studio.app/Contents/Info.plist
echo -n "APPL????" >studio.app/Contents/PkgInfo

View File

@@ -130,7 +130,7 @@ plot$(EXEEXT): $(PLOT_OBJECTS) $(__plot___win32rc)
$(__plot___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
plot.app/Contents/PkgInfo: plot$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
plot.app/Contents/PkgInfo: plot$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mkdir -p plot.app/Contents
mkdir -p plot.app/Contents/MacOS
mkdir -p plot.app/Contents/Resources
@@ -139,7 +139,7 @@ plot.app/Contents/PkgInfo: plot$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(L
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/plot/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/Info.plist.in >plot.app/Contents/Info.plist
$(top_srcdir)/src/mac/carbon/Info.plist.in >plot.app/Contents/Info.plist
echo -n "APPL????" >plot.app/Contents/PkgInfo

View File

@@ -132,7 +132,7 @@ stctest$(EXEEXT): $(STCTEST_OBJECTS) $(__stctest___win32rc)
$(__stctest___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
stctest.app/Contents/PkgInfo: stctest$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
stctest.app/Contents/PkgInfo: stctest$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mkdir -p stctest.app/Contents
mkdir -p stctest.app/Contents/MacOS
mkdir -p stctest.app/Contents/Resources
@@ -141,7 +141,7 @@ stctest.app/Contents/PkgInfo: stctest$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/stctest/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/Info.plist.in >stctest.app/Contents/Info.plist
$(top_srcdir)/src/mac/carbon/Info.plist.in >stctest.app/Contents/Info.plist
echo -n "APPL????" >stctest.app/Contents/PkgInfo

View File

@@ -130,7 +130,7 @@ svgtest$(EXEEXT): $(SVGTEST_OBJECTS) $(__svgtest___win32rc)
$(__svgtest___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
svgtest.app/Contents/PkgInfo: svgtest$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
svgtest.app/Contents/PkgInfo: svgtest$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mkdir -p svgtest.app/Contents
mkdir -p svgtest.app/Contents/MacOS
mkdir -p svgtest.app/Contents/Resources
@@ -139,7 +139,7 @@ svgtest.app/Contents/PkgInfo: svgtest$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/svgtest/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/Info.plist.in >svgtest.app/Contents/Info.plist
$(top_srcdir)/src/mac/carbon/Info.plist.in >svgtest.app/Contents/Info.plist
echo -n "APPL????" >svgtest.app/Contents/PkgInfo

View File

@@ -145,7 +145,7 @@ xrcdemo$(EXEEXT): $(XRCDEMO_OBJECTS) $(__xrcdemo___win32rc)
$(__xrcdemo___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
xrcdemo.app/Contents/PkgInfo: xrcdemo$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
xrcdemo.app/Contents/PkgInfo: xrcdemo$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).1.rsrc $(top_srcdir)/src/mac/wxmac.icns
mkdir -p xrcdemo.app/Contents
mkdir -p xrcdemo.app/Contents/MacOS
mkdir -p xrcdemo.app/Contents/Resources
@@ -154,7 +154,7 @@ xrcdemo.app/Contents/PkgInfo: xrcdemo$(EXEEXT) $(top_srcdir)/src/mac/Info.plist.
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/xrcdemo/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/Info.plist.in >xrcdemo.app/Contents/Info.plist
$(top_srcdir)/src/mac/carbon/Info.plist.in >xrcdemo.app/Contents/Info.plist
echo -n "APPL????" >xrcdemo.app/Contents/PkgInfo

View File

@@ -89,6 +89,8 @@ All (GUI):
- wxHtmlWindow now delays image scaling until rendering,
resulting in much better display of scaled images
- Added UpdateSize to wxSplitterWindow to allow layout
while hidden
wxMSW:

View File

@@ -419,3 +419,17 @@ which can be overridden for the desired behaviour. By default, the pane being re
\helpref{wxSplitterWindow::SplitHorizontally}{wxsplitterwindowsplithorizontally}, \helpref{wxSplitterWindow::SplitVertically}{wxsplitterwindowsplitvertically},\rtfsp
\helpref{wxSplitterWindow::IsSplit}{wxsplitterwindowissplit}, \helpref{wxSplitterWindow::OnUnsplit}{wxsplitterwindowonunsplit}
\membersection{wxSplitterWindow::UpdateSize}\label{wxsplitterwindowupdatesize}
\func{void}{UpdateSize}{\void}
Causes any pending sizing of the sash and child panes to take place
immediately.
Such resizing normally takes place in idle time, in order
to wait for layout to be completed. However, this can cause
unacceptable flicker as the panes are resized after the window has been
shown. To work around this, you can perform window layout (for
example by sending a size event to the parent window), and then
call this function, before showing the top-level window.

View File

@@ -46,7 +46,7 @@ protected:
bool CocoaUnwindStackAndTakeFocus();
inline bool CocoaTakeFocus()
{
wxCocoaDCStack::Node *node = sm_cocoaDCStack.GetFirst();
wxCocoaDCStack::compatibility_iterator node = sm_cocoaDCStack.GetFirst();
if(node && (node->GetData() == this))
return true;
return CocoaUnwindStackAndTakeFocus();

View File

@@ -87,8 +87,6 @@ protected:
// Implementation
// ------------------------------------------------------------------------
public:
wxMenuItemList m_items; // the list of menu items
// implement base class virtuals
virtual bool Append(wxMenu *menu, const wxString &title);
virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title);

View File

@@ -2035,6 +2035,8 @@ enum wxUpdateUI
#ifdef __WXMAC__
#define WX_OPAQUE_TYPE( name ) struct wxOpaque##name
typedef unsigned char WXCOLORREF[6];
typedef void* WXHBITMAP;
typedef void* WXHMETAFILE;
@@ -2054,8 +2056,11 @@ typedef unsigned int WXUINT;
typedef unsigned long WXDWORD;
typedef unsigned short WXWORD;
typedef void* WXWidget;
typedef void* WXWindow;
//typedef void* WXWidget;
//typedef void* WXWindow;
typedef WX_OPAQUE_TYPE(ControlRef ) * WXWidget ;
typedef WX_OPAQUE_TYPE(WindowRef) * WXWindow ;
typedef void* WXDisplay;
/* typedef WindowPtr WXHWND; */

View File

@@ -1,53 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: accel.h
// Purpose: wxAcceleratorTable class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ACCEL_H_
#define _WX_ACCEL_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "accel.h"
#endif
#include "wx/string.h"
#include "wx/event.h"
class WXDLLEXPORT wxAcceleratorTable: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
public:
wxAcceleratorTable();
wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]); // Load from array
// Copy constructors
wxAcceleratorTable(const wxAcceleratorTable& accel)
: wxObject()
{ Ref(accel); }
wxAcceleratorTable(const wxAcceleratorTable* accel)
{ if (accel) Ref(*accel); }
~wxAcceleratorTable();
wxAcceleratorTable& operator = (const wxAcceleratorTable& accel)
{ if (*this == accel) return (*this); Ref(accel); return *this; }
bool operator == (const wxAcceleratorTable& accel)
{ return m_refData == accel.m_refData; }
bool operator != (const wxAcceleratorTable& accel)
{ return m_refData != accel.m_refData; }
bool Ok() const;
int GetCommand( wxKeyEvent &event );
};
// WXDLLEXPORT_DATA(extern wxAcceleratorTable) wxNullAcceleratorTable;
#endif
// _WX_ACCEL_H_
#if __WXMAC_CLASSIC__
#include "wx/mac/classic/accel.h"
#else
#include "wx/mac/carbon/accel.h"
#endif

View File

@@ -1,207 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: app.h
// Purpose: wxApp class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_APP_H_
#define _WX_APP_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "app.h"
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/gdicmn.h"
#include "wx/event.h"
class WXDLLEXPORT wxFrame;
class WXDLLEXPORT wxWindowMac;
class WXDLLEXPORT wxApp ;
class WXDLLEXPORT wxKeyEvent;
class WXDLLEXPORT wxLog;
#define wxPRINT_WINDOWS 1
#define wxPRINT_POSTSCRIPT 2
WXDLLEXPORT_DATA(extern wxApp*) wxTheApp;
// Force an exit from main loop
void WXDLLEXPORT wxExit();
// Yield to other apps/messages
bool WXDLLEXPORT wxYield();
// Represents the application. Derive OnInit and declare
// a new App object to start application
class WXDLLEXPORT wxApp: public wxAppBase
{
DECLARE_DYNAMIC_CLASS(wxApp)
wxApp();
virtual ~wxApp() {}
virtual int MainLoop();
virtual void ExitMainLoop();
virtual bool Pending() ;
virtual bool Dispatch() ;
virtual void Exit();
virtual bool Yield(bool onlyIfNeeded = FALSE);
virtual void WakeUpIdle();
virtual void SetPrintMode(int mode) { m_printMode = mode; }
virtual int GetPrintMode() const { return m_printMode; }
#if wxUSE_GUI
// setting up all MacOS Specific Event-Handlers etc
virtual bool OnInitGui();
#endif // wxUSE_GUI
// implementation only
void OnIdle(wxIdleEvent& event);
void OnEndSession(wxCloseEvent& event);
void OnQueryEndSession(wxCloseEvent& event);
// Windows only, but for compatibility...
inline void SetAuto3D(bool flag) { m_auto3D = flag; }
inline bool GetAuto3D() const { return m_auto3D; }
protected:
bool m_showOnInit;
int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT
bool m_auto3D ; // Always use 3D controls, except
// where overriden
public:
static bool sm_isEmbedded;
// Implementation
virtual bool Initialize(int& argc, wxChar **argv);
virtual void CleanUp();
bool IsExiting() { return !m_keepGoing ; }
#if TARGET_CARBON
// the installed application event handler
WXEVENTHANDLERREF MacGetEventHandler() { return m_macEventHandler ; }
WXEVENTHANDLERREF MacGetCurrentEventHandlerCallRef() { return m_macCurrentEventHandlerCallRef ; }
void MacSetCurrentEvent( WXEVENTREF event , WXEVENTHANDLERCALLREF handler )
{ m_macCurrentEvent = event ; m_macCurrentEventHandlerCallRef = handler ; }
#endif
public:
static long sm_lastMessageTime;
static wxWindow* s_captureWindow ;
static int s_lastMouseDown ; // 0 = none , 1 = left , 2 = right
static WXHRGN s_macCursorRgn ;
static long s_lastModifiers ;
int m_nCmdShow;
private:
bool m_keepGoing ;
// mac specifics
#if TARGET_CARBON
WXEVENTHANDLERREF m_macEventHandler ;
WXEVENTHANDLERCALLREF m_macCurrentEventHandlerCallRef ;
#endif
WXEVENTREF m_macCurrentEvent ;
public:
static bool s_macSupportPCMenuShortcuts ;
static long s_macAboutMenuItemId ;
static long s_macPreferencesMenuItemId ;
static long s_macExitMenuItemId ;
static wxString s_macHelpMenuTitleName ;
static bool s_macHasAppearance ;
static long s_macAppearanceVersion ;
static bool s_macHasNavigation ;
static bool s_macNavigationVersion ;
static bool s_macHasWindowManager ;
static long s_macWindowManagerVersion ;
static bool s_macHasMenuManager ;
static long s_macMenuManagerVersion ;
static bool s_macHasDialogManager ;
static long s_macDialogManagerVersion ;
WXHRGN m_macCursorRgn ;
WXHRGN m_macSleepRgn ;
WXHRGN m_macHelpRgn ;
virtual void MacSuspend( bool convertClipboard ) ;
virtual void MacResume( bool convertClipboard ) ;
virtual void MacConvertPrivateToPublicScrap() ;
virtual void MacConvertPublicToPrivateScrap() ;
void MacDoOneEvent() ;
WXEVENTREF MacGetCurrentEvent() { return m_macCurrentEvent ; }
void MacHandleOneEvent( WXEVENTREF ev ) ;
// For embedded use. By default does nothing.
virtual void MacHandleUnhandledEvent( WXEVENTREF ev );
#if !TARGET_CARBON
virtual void MacHandleMenuSelect( int menuid , int menuitem ) ;
virtual void MacHandleMouseUpEvent( WXEVENTREF ev ) ;
virtual void MacHandleOSEvent( WXEVENTREF ev ) ;
virtual void MacHandleDiskEvent( WXEVENTREF ev ) ;
virtual void MacHandleActivateEvent( WXEVENTREF ev ) ;
virtual void MacHandleUpdateEvent( WXEVENTREF ev ) ;
virtual void MacHandleMouseDownEvent( WXEVENTREF ev ) ;
void MacHandleModifierEvents( WXEVENTREF ev ) ;
virtual void MacHandleKeyDownEvent( WXEVENTREF ev ) ;
virtual void MacHandleKeyUpEvent( WXEVENTREF ev ) ;
virtual void MacHandleHighLevelEvent( WXEVENTREF ev ) ;
#if __WXMAC_CLASSIC__
#include "wx/mac/classic/app.h"
#else
virtual void MacHandleMouseMovedEvent( wxInt32 x , wxInt32 y ,wxUint32 modifiers , long timestamp ) ;
#endif
void MacHandleMenuCommand( wxUint32 command ) ;
bool MacSendKeyDownEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey ) ;
bool MacSendKeyUpEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey ) ;
virtual short MacHandleAEODoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
virtual short MacHandleAEPDoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
virtual short MacHandleAEOApp(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
virtual short MacHandleAEQuit(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
virtual short MacHandleAERApp(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
// in response of an open-document apple event
virtual void MacOpenFile(const wxString &fileName) ;
// in response of a print-document apple event
virtual void MacPrintFile(const wxString &fileName) ;
// in response of a open-application apple event
virtual void MacNewFile() ;
// in response of a reopen-application apple event
virtual void MacReopenApp() ;
DECLARE_EVENT_TABLE()
};
class WXDLLEXPORT wxStAppResource
{
public:
wxStAppResource() ;
~wxStAppResource() ;
// opaque pointer for CFragInitBlock
static void OpenSharedLibraryResource(const void *) ;
static void CloseSharedLibraryResource() ;
private:
short m_currentRefNum ;
} ;
#endif
// _WX_APP_H_
#include "wx/mac/carbon/app.h"
#endif

View File

@@ -1,39 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/mac/apptbase.h
// Purpose: declaration of wxAppTraits for Mac systems
// Author: Vadim Zeitlin
// Modified by: Stefan Csomor
// Created: 23.06.2003
// RCS-ID: $Id$
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MAC_APPTBASE_H_
#define _WX_MAC_APPTBASE_H_
// ----------------------------------------------------------------------------
// wxAppTraits: the Mac version adds extra hooks needed by Mac code
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxAppTraits : public wxAppTraitsBase
{
public:
// wxExecute() support methods
// ---------------------------
// TODO
// wxThread helpers
// ----------------
// TODO
// other miscellaneous helpers
// ---------------------------
};
#endif // _WX_MAC_APPTBASE_H_
#if __WXMAC_CLASSIC__
#include "wx/mac/classic/apptbase.h"
#else
#include "wx/mac/carbon/apptbase.h"
#endif

View File

@@ -1,42 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/mac/apptrait.h
// Purpose: standard implementations of wxAppTraits for MacOS
// Author: Vadim Zeitlin
// Modified by: Stefan Csomor
// Created: 23.06.2003
// RCS-ID: $Id$
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MAC_APPTRAIT_H_
#define _WX_MAC_APPTRAIT_H_
// ----------------------------------------------------------------------------
// wxGUI/ConsoleAppTraits: must derive from wxAppTraits, not wxAppTraitsBase
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxConsoleAppTraits : public wxConsoleAppTraitsBase
{
public:
// other miscellaneous helpers
// ---------------------------
virtual wxToolkitInfo& GetToolkitInfo();
};
#if wxUSE_GUI
class WXDLLEXPORT wxGUIAppTraits : public wxGUIAppTraitsBase
{
public:
// other miscellaneous helpers
// ---------------------------
virtual wxToolkitInfo& GetToolkitInfo();
};
#endif // wxUSE_GUI
#endif // _WX_MAC_APPTRAIT_H_
#if __WXMAC_CLASSIC__
#include "wx/mac/classic/apptrait.h"
#else
#include "wx/mac/carbon/apptrait.h"
#endif

View File

@@ -1,225 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: bitmap.h
// Purpose: wxBitmap class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BITMAP_H_
#define _WX_BITMAP_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "bitmap.h"
#endif
#include "wx/palette.h"
// Bitmap
class WXDLLEXPORT wxBitmap;
class WXDLLEXPORT wxBitmapHandler;
class WXDLLEXPORT wxControl;
class WXDLLEXPORT wxCursor;
class WXDLLEXPORT wxDC;
class WXDLLEXPORT wxIcon;
class WXDLLEXPORT wxImage;
class WXDLLEXPORT wxPixelDataBase;
// A mask is a bitmap used for drawing bitmaps
// it can be a monochrome bitmap or a multi-bit bitmap which transfers to alpha channels
// transparently.
class WXDLLEXPORT wxMask: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxMask)
DECLARE_NO_COPY_CLASS(wxMask)
public:
wxMask();
// Construct a mask from a bitmap and a colour indicating
// the transparent area
wxMask(const wxBitmap& bitmap, const wxColour& colour);
// Construct a mask from a bitmap and a palette index indicating
// the transparent area
wxMask(const wxBitmap& bitmap, int paletteIndex);
// Construct a mask from a mono bitmap (copies the bitmap).
wxMask(const wxBitmap& bitmap);
~wxMask();
bool Create(const wxBitmap& bitmap, const wxColour& colour);
bool Create(const wxBitmap& bitmap, int paletteIndex);
bool Create(const wxBitmap& bitmap);
// Implementation
bool PointMasked(int x, int y);
inline WXHBITMAP GetMaskBitmap() const { return m_maskBitmap; }
inline void SetMaskBitmap(WXHBITMAP bmp) { m_maskBitmap = bmp; }
int GetDepth() const { return m_depth ; }
void SetDepth( int depth ) { m_depth = depth ; }
protected:
WXHBITMAP m_maskBitmap;
int m_depth ;
};
enum { kMacBitmapTypeUnknownType , kMacBitmapTypeGrafWorld, kMacBitmapTypePict , kMacBitmapTypeIcon } ;
class WXDLLEXPORT wxBitmapRefData: public wxGDIRefData
{
DECLARE_NO_COPY_CLASS(wxBitmapRefData)
friend class WXDLLEXPORT wxBitmap;
friend class WXDLLEXPORT wxIcon;
friend class WXDLLEXPORT wxCursor;
public:
wxBitmapRefData();
~wxBitmapRefData();
public:
int m_width;
int m_height;
int m_depth;
bool m_ok;
int m_numColors;
#if wxUSE_PALETTE
wxPalette m_bitmapPalette;
#endif // wxUSE_PALETTE
int m_quality;
int m_bitmapType ;
WXHMETAFILE m_hPict ;
WXHBITMAP m_hBitmap;
WXHICON m_hIcon ;
wxMask * m_bitmapMask; // Optional mask
bool m_hasAlpha;
};
#define M_BITMAPDATA ((wxBitmapRefData *)m_refData)
class WXDLLEXPORT wxBitmapHandler: public wxBitmapHandlerBase
{
DECLARE_DYNAMIC_CLASS(wxBitmapHandler)
public:
wxBitmapHandler() : m_name(), m_extension(), m_type(0) { }
virtual ~wxBitmapHandler();
virtual bool Create(wxBitmap *bitmap, void *data, long flags, int width, int height, int depth = 1);
virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
int desiredWidth, int desiredHeight);
virtual bool SaveFile(const wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = NULL);
void SetName(const wxString& name) { m_name = name; }
void SetExtension(const wxString& ext) { m_extension = ext; }
void SetType(long type) { m_type = type; }
wxString GetName() const { return m_name; }
wxString GetExtension() const { return m_extension; }
long GetType() const { return m_type; }
protected:
wxString m_name;
wxString m_extension;
long m_type;
};
#define M_BITMAPHANDLERDATA ((wxBitmapRefData *)bitmap->GetRefData())
class WXDLLEXPORT wxBitmap: public wxBitmapBase
{
DECLARE_DYNAMIC_CLASS(wxBitmap)
friend class WXDLLEXPORT wxBitmapHandler;
public:
wxBitmap(); // Platform-specific
// Copy constructors
wxBitmap(const wxBitmap& bitmap)
: wxBitmapBase()
{ Ref(bitmap); }
// Initialize with raw data.
wxBitmap(const char bits[], int width, int height, int depth = 1);
// Initialize with XPM data
bool CreateFromXpm(const char **bits);
wxBitmap(const char **bits);
wxBitmap(char **bits);
// Load a file or resource
wxBitmap(const wxString& name, wxBitmapType type = wxBITMAP_TYPE_PICT_RESOURCE);
// Constructor for generalised creation from data
wxBitmap(void *data, wxBitmapType type, int width, int height, int depth = 1);
// If depth is omitted, will create a bitmap compatible with the display
wxBitmap(int width, int height, int depth = -1);
// Convert from wxImage:
wxBitmap(const wxImage& image, int depth = -1);
~wxBitmap();
wxImage ConvertToImage() const;
// get the given part of bitmap
wxBitmap GetSubBitmap( const wxRect& rect ) const;
virtual bool Create(int width, int height, int depth = -1);
virtual bool Create(void *data, wxBitmapType type, int width, int height, int depth = 1);
virtual bool LoadFile(const wxString& name, wxBitmapType type = wxBITMAP_TYPE_BMP_RESOURCE);
virtual bool SaveFile(const wxString& name, wxBitmapType type, const wxPalette *cmap = NULL) const;
// copies the contents and mask of the given (colour) icon to the bitmap
virtual bool CopyFromIcon(const wxIcon& icon);
bool Ok() const;
int GetWidth() const;
int GetHeight() const;
int GetDepth() const;
int GetQuality() const;
void SetWidth(int w);
void SetHeight(int h);
void SetDepth(int d);
void SetQuality(int q);
void SetOk(bool isOk);
#if wxUSE_PALETTE
wxPalette* GetPalette() const;
void SetPalette(const wxPalette& palette);
#endif // wxUSE_PALETTE
wxMask *GetMask() const;
void SetMask(wxMask *mask) ;
int GetBitmapType() const;
inline wxBitmap& operator = (const wxBitmap& bitmap) { if (*this == bitmap) return (*this); Ref(bitmap); return *this; }
inline bool operator == (const wxBitmap& bitmap) const { return m_refData == bitmap.m_refData; }
inline bool operator != (const wxBitmap& bitmap) const { return m_refData != bitmap.m_refData; }
static void InitStandardHandlers();
// raw bitmap access support functions, for internal use only
void *GetRawData(wxPixelDataBase& data, int bpp);
void UngetRawData(wxPixelDataBase& data);
void UseAlpha();
public:
WXHBITMAP GetHBITMAP() const;
inline WXHICON GetHICON() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_hIcon : 0); }
WXHMETAFILE GetPict(bool *created = NULL ) const;
void SetHBITMAP(WXHBITMAP bmp);
void SetHICON(WXHICON ico);
void SetPict( WXHMETAFILE pict ) ;
bool FreeResource(bool force = FALSE);
};
#endif
// _WX_BITMAP_H_
#if __WXMAC_CLASSIC__
#include "wx/mac/classic/bitmap.h"
#else
#include "wx/mac/carbon/bitmap.h"
#endif

View File

@@ -1,65 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: bmpbuttn.h
// Purpose: wxBitmapButton class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BMPBUTTN_H_
#define _WX_BMPBUTTN_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "bmpbuttn.h"
#endif
#include "wx/button.h"
WXDLLEXPORT_DATA(extern const wxChar*) wxButtonNameStr;
#define wxDEFAULT_BUTTON_MARGIN 4
class WXDLLEXPORT wxBitmapButton: public wxBitmapButtonBase
{
DECLARE_DYNAMIC_CLASS(wxBitmapButton)
public:
wxBitmapButton()
{
SetMargins(wxDEFAULT_BUTTON_MARGIN, wxDEFAULT_BUTTON_MARGIN);
}
wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr)
{
Create(parent, id, bitmap, pos, size, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
virtual void SetBitmapLabel(const wxBitmap& bitmap);
/*
// TODO: Implementation
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
virtual void DrawFace( WXHDC dc, int left, int top, int right, int bottom, bool sel );
virtual void DrawButtonFocus( WXHDC dc, int left, int top, int right, int bottom, bool sel );
virtual void DrawButtonDisable( WXHDC dc, int left, int top, int right, int bottom, bool with_marg );
*/
protected:
virtual wxSize DoGetBestSize() const;
};
#endif
// _WX_BMPBUTTN_H_
#if __WXMAC_CLASSIC__
#include "wx/mac/classic/bmpbuttn.h"
#else
#include "wx/mac/carbon/bmpbuttn.h"
#endif

View File

@@ -1,82 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: brush.h
// Purpose: wxBrush class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BRUSH_H_
#define _WX_BRUSH_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "brush.h"
#endif
#include "wx/gdicmn.h"
#include "wx/gdiobj.h"
#include "wx/bitmap.h"
class WXDLLEXPORT wxBrush;
typedef enum
{
kwxMacBrushColour ,
kwxMacBrushTheme ,
kwxMacBrushThemeBackground
} wxMacBrushKind ;
// Brush
class WXDLLEXPORT wxBrush: public wxGDIObject
{
DECLARE_DYNAMIC_CLASS(wxBrush)
public:
wxBrush();
wxBrush(short macThemeBrush ) ;
wxBrush(const wxColour& col, int style = wxSOLID);
wxBrush(const wxBitmap& stipple);
wxBrush(const wxBrush& brush)
: wxGDIObject()
{ Ref(brush); }
~wxBrush();
virtual void SetColour(const wxColour& col) ;
virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
virtual void SetStyle(int style) ;
virtual void SetStipple(const wxBitmap& stipple) ;
virtual void SetMacTheme(short macThemeBrush) ;
virtual void SetMacThemeBackground(unsigned long macThemeBackground , WXRECTPTR extent) ;
wxBrush& operator = (const wxBrush& brush)
{ if (*this == brush) return (*this); Ref(brush); return *this; }
bool operator == (const wxBrush& brush)
{ return m_refData == brush.m_refData; }
bool operator != (const wxBrush& brush)
{ return m_refData != brush.m_refData; }
wxMacBrushKind MacGetBrushKind() const ;
unsigned long GetMacThemeBackground(WXRECTPTR extent) const ;
short GetMacTheme() const ;
wxColour& GetColour() const ;
int GetStyle() const ;
wxBitmap *GetStipple() const ;
virtual bool Ok() const { return (m_refData != NULL) ; }
// Implementation
// Useful helper: create the brush resource
bool RealizeResource();
// When setting properties, we must make sure we're not changing
// another object
void Unshare();
};
#endif
// _WX_BRUSH_H_
#if __WXMAC_CLASSIC__
#include "wx/mac/classic/brush.h"
#else
#include "wx/mac/carbon/brush.h"
#endif

View File

@@ -1,55 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: button.h
// Purpose: wxButton class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BUTTON_H_
#define _WX_BUTTON_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "button.h"
#endif
#include "wx/control.h"
#include "wx/gdicmn.h"
WXDLLEXPORT_DATA(extern const wxChar*) wxButtonNameStr;
// Pushbutton
class WXDLLEXPORT wxButton: public wxButtonBase
{
DECLARE_DYNAMIC_CLASS(wxButton)
public:
inline wxButton() {}
inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ;
static wxSize GetDefaultSize();
virtual void SetDefault();
virtual void Command(wxCommandEvent& event);
protected:
virtual wxSize DoGetBestSize() const ;
};
#endif
// _WX_BUTTON_H_
#if __WXMAC_CLASSIC__
#include "wx/mac/classic/button.h"
#else
#include "wx/mac/carbon/button.h"
#endif

View File

@@ -0,0 +1,53 @@
/////////////////////////////////////////////////////////////////////////////
// Name: accel.h
// Purpose: wxAcceleratorTable class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ACCEL_H_
#define _WX_ACCEL_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "accel.h"
#endif
#include "wx/string.h"
#include "wx/event.h"
class WXDLLEXPORT wxAcceleratorTable: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
public:
wxAcceleratorTable();
wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]); // Load from array
// Copy constructors
wxAcceleratorTable(const wxAcceleratorTable& accel)
: wxObject()
{ Ref(accel); }
wxAcceleratorTable(const wxAcceleratorTable* accel)
{ if (accel) Ref(*accel); }
~wxAcceleratorTable();
wxAcceleratorTable& operator = (const wxAcceleratorTable& accel)
{ if (*this == accel) return (*this); Ref(accel); return *this; }
bool operator == (const wxAcceleratorTable& accel)
{ return m_refData == accel.m_refData; }
bool operator != (const wxAcceleratorTable& accel)
{ return m_refData != accel.m_refData; }
bool Ok() const;
int GetCommand( wxKeyEvent &event );
};
// WXDLLEXPORT_DATA(extern wxAcceleratorTable) wxNullAcceleratorTable;
#endif
// _WX_ACCEL_H_

View File

@@ -0,0 +1,13 @@
/////////////////////////////////////////////////////////////////////////////
// Name: aga.h
// Purpose: Gray Controls implementation
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// NOT NEEDED ANYMORE

175
include/wx/mac/carbon/app.h Normal file
View File

@@ -0,0 +1,175 @@
/////////////////////////////////////////////////////////////////////////////
// Name: app.h
// Purpose: wxApp class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_APP_H_
#define _WX_APP_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "app.h"
#endif
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/gdicmn.h"
#include "wx/event.h"
class WXDLLEXPORT wxFrame;
class WXDLLEXPORT wxWindowMac;
class WXDLLEXPORT wxApp ;
class WXDLLEXPORT wxKeyEvent;
class WXDLLEXPORT wxLog;
#define wxPRINT_WINDOWS 1
#define wxPRINT_POSTSCRIPT 2
WXDLLEXPORT_DATA(extern wxApp*) wxTheApp;
// Force an exit from main loop
void WXDLLEXPORT wxExit();
// Yield to other apps/messages
bool WXDLLEXPORT wxYield();
// Represents the application. Derive OnInit and declare
// a new App object to start application
class WXDLLEXPORT wxApp: public wxAppBase
{
DECLARE_DYNAMIC_CLASS(wxApp)
wxApp();
virtual ~wxApp() {}
virtual int MainLoop();
virtual void ExitMainLoop();
virtual bool Pending() ;
virtual bool Dispatch() ;
virtual void Exit();
virtual bool Yield(bool onlyIfNeeded = FALSE);
virtual void WakeUpIdle();
virtual void SetPrintMode(int mode) { m_printMode = mode; }
virtual int GetPrintMode() const { return m_printMode; }
#if wxUSE_GUI
// setting up all MacOS Specific Event-Handlers etc
virtual bool OnInitGui();
#endif // wxUSE_GUI
// implementation only
void OnIdle(wxIdleEvent& event);
void OnEndSession(wxCloseEvent& event);
void OnQueryEndSession(wxCloseEvent& event);
protected:
bool m_showOnInit;
int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT
public:
static bool sm_isEmbedded;
// Implementation
virtual bool Initialize(int& argc, wxChar **argv);
virtual void CleanUp();
bool IsExiting() { return !m_keepGoing ; }
// the installed application event handler
WXEVENTHANDLERREF MacGetEventHandler() { return m_macEventHandler ; }
WXEVENTHANDLERREF MacGetCurrentEventHandlerCallRef() { return m_macCurrentEventHandlerCallRef ; }
void MacSetCurrentEvent( WXEVENTREF event , WXEVENTHANDLERCALLREF handler )
{ m_macCurrentEvent = event ; m_macCurrentEventHandlerCallRef = handler ; }
public:
static long sm_lastMessageTime;
static wxWindow* s_captureWindow ;
static int s_lastMouseDown ; // 0 = none , 1 = left , 2 = right
static WXHRGN s_macCursorRgn ;
static long s_lastModifiers ;
int m_nCmdShow;
private:
bool m_keepGoing ;
// mac specifics
WXEVENTHANDLERREF m_macEventHandler ;
WXEVENTHANDLERCALLREF m_macCurrentEventHandlerCallRef ;
WXEVENTREF m_macCurrentEvent ;
public:
static bool s_macSupportPCMenuShortcuts ;
static long s_macAboutMenuItemId ;
static long s_macPreferencesMenuItemId ;
static long s_macExitMenuItemId ;
static wxString s_macHelpMenuTitleName ;
static bool s_macHasAppearance ;
static long s_macAppearanceVersion ;
static bool s_macHasNavigation ;
static bool s_macNavigationVersion ;
static bool s_macHasWindowManager ;
static long s_macWindowManagerVersion ;
static bool s_macHasMenuManager ;
static long s_macMenuManagerVersion ;
static bool s_macHasDialogManager ;
static long s_macDialogManagerVersion ;
WXHRGN m_macCursorRgn ;
WXHRGN m_macSleepRgn ;
WXHRGN m_macHelpRgn ;
void MacDoOneEvent() ;
WXEVENTREF MacGetCurrentEvent() { return m_macCurrentEvent ; }
void MacHandleOneEvent( WXEVENTREF ev ) ;
// For embedded use. By default does nothing.
virtual void MacHandleUnhandledEvent( WXEVENTREF ev );
bool MacSendKeyDownEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey ) ;
bool MacSendKeyUpEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey ) ;
virtual short MacHandleAEODoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
virtual short MacHandleAEPDoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
virtual short MacHandleAEOApp(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
virtual short MacHandleAEQuit(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
virtual short MacHandleAERApp(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
// in response of an open-document apple event
virtual void MacOpenFile(const wxString &fileName) ;
// in response of a print-document apple event
virtual void MacPrintFile(const wxString &fileName) ;
// in response of a open-application apple event
virtual void MacNewFile() ;
// in response of a reopen-application apple event
virtual void MacReopenApp() ;
DECLARE_EVENT_TABLE()
};
class WXDLLEXPORT wxStAppResource
{
public:
wxStAppResource() ;
~wxStAppResource() ;
// opaque pointer for CFragInitBlock
static void OpenSharedLibraryResource(const void *) ;
static void CloseSharedLibraryResource() ;
private:
short m_currentRefNum ;
} ;
#endif
// _WX_APP_H_

View File

@@ -0,0 +1,39 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/mac/apptbase.h
// Purpose: declaration of wxAppTraits for Mac systems
// Author: Vadim Zeitlin
// Modified by: Stefan Csomor
// Created: 23.06.2003
// RCS-ID: $Id$
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MAC_APPTBASE_H_
#define _WX_MAC_APPTBASE_H_
// ----------------------------------------------------------------------------
// wxAppTraits: the Mac version adds extra hooks needed by Mac code
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxAppTraits : public wxAppTraitsBase
{
public:
// wxExecute() support methods
// ---------------------------
// TODO
// wxThread helpers
// ----------------
// TODO
// other miscellaneous helpers
// ---------------------------
};
#endif // _WX_MAC_APPTBASE_H_

View File

@@ -0,0 +1,42 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/mac/apptrait.h
// Purpose: standard implementations of wxAppTraits for MacOS
// Author: Vadim Zeitlin
// Modified by: Stefan Csomor
// Created: 23.06.2003
// RCS-ID: $Id$
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MAC_APPTRAIT_H_
#define _WX_MAC_APPTRAIT_H_
// ----------------------------------------------------------------------------
// wxGUI/ConsoleAppTraits: must derive from wxAppTraits, not wxAppTraitsBase
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxConsoleAppTraits : public wxConsoleAppTraitsBase
{
public:
// other miscellaneous helpers
// ---------------------------
virtual wxToolkitInfo& GetToolkitInfo();
};
#if wxUSE_GUI
class WXDLLEXPORT wxGUIAppTraits : public wxGUIAppTraitsBase
{
public:
// other miscellaneous helpers
// ---------------------------
virtual wxToolkitInfo& GetToolkitInfo();
};
#endif // wxUSE_GUI
#endif // _WX_MAC_APPTRAIT_H_

View File

@@ -0,0 +1,225 @@
/////////////////////////////////////////////////////////////////////////////
// Name: bitmap.h
// Purpose: wxBitmap class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BITMAP_H_
#define _WX_BITMAP_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "bitmap.h"
#endif
#include "wx/palette.h"
// Bitmap
class WXDLLEXPORT wxBitmap;
class WXDLLEXPORT wxBitmapHandler;
class WXDLLEXPORT wxControl;
class WXDLLEXPORT wxCursor;
class WXDLLEXPORT wxDC;
class WXDLLEXPORT wxIcon;
class WXDLLEXPORT wxImage;
class WXDLLEXPORT wxPixelDataBase;
// A mask is a bitmap used for drawing bitmaps
// it can be a monochrome bitmap or a multi-bit bitmap which transfers to alpha channels
// transparently.
class WXDLLEXPORT wxMask: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxMask)
DECLARE_NO_COPY_CLASS(wxMask)
public:
wxMask();
// Construct a mask from a bitmap and a colour indicating
// the transparent area
wxMask(const wxBitmap& bitmap, const wxColour& colour);
// Construct a mask from a bitmap and a palette index indicating
// the transparent area
wxMask(const wxBitmap& bitmap, int paletteIndex);
// Construct a mask from a mono bitmap (copies the bitmap).
wxMask(const wxBitmap& bitmap);
~wxMask();
bool Create(const wxBitmap& bitmap, const wxColour& colour);
bool Create(const wxBitmap& bitmap, int paletteIndex);
bool Create(const wxBitmap& bitmap);
// Implementation
bool PointMasked(int x, int y);
inline WXHBITMAP GetMaskBitmap() const { return m_maskBitmap; }
inline void SetMaskBitmap(WXHBITMAP bmp) { m_maskBitmap = bmp; }
int GetDepth() const { return m_depth ; }
void SetDepth( int depth ) { m_depth = depth ; }
protected:
WXHBITMAP m_maskBitmap;
int m_depth ;
};
enum { kMacBitmapTypeUnknownType , kMacBitmapTypeGrafWorld, kMacBitmapTypePict , kMacBitmapTypeIcon } ;
class WXDLLEXPORT wxBitmapRefData: public wxGDIRefData
{
DECLARE_NO_COPY_CLASS(wxBitmapRefData)
friend class WXDLLEXPORT wxBitmap;
friend class WXDLLEXPORT wxIcon;
friend class WXDLLEXPORT wxCursor;
public:
wxBitmapRefData();
~wxBitmapRefData();
public:
int m_width;
int m_height;
int m_depth;
bool m_ok;
int m_numColors;
#if wxUSE_PALETTE
wxPalette m_bitmapPalette;
#endif // wxUSE_PALETTE
int m_quality;
int m_bitmapType ;
WXHMETAFILE m_hPict ;
WXHBITMAP m_hBitmap;
WXHICON m_hIcon ;
wxMask * m_bitmapMask; // Optional mask
bool m_hasAlpha;
};
#define M_BITMAPDATA ((wxBitmapRefData *)m_refData)
class WXDLLEXPORT wxBitmapHandler: public wxBitmapHandlerBase
{
DECLARE_DYNAMIC_CLASS(wxBitmapHandler)
public:
wxBitmapHandler() : m_name(), m_extension(), m_type(0) { }
virtual ~wxBitmapHandler();
virtual bool Create(wxBitmap *bitmap, void *data, long flags, int width, int height, int depth = 1);
virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
int desiredWidth, int desiredHeight);
virtual bool SaveFile(const wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = NULL);
void SetName(const wxString& name) { m_name = name; }
void SetExtension(const wxString& ext) { m_extension = ext; }
void SetType(long type) { m_type = type; }
wxString GetName() const { return m_name; }
wxString GetExtension() const { return m_extension; }
long GetType() const { return m_type; }
protected:
wxString m_name;
wxString m_extension;
long m_type;
};
#define M_BITMAPHANDLERDATA ((wxBitmapRefData *)bitmap->GetRefData())
class WXDLLEXPORT wxBitmap: public wxBitmapBase
{
DECLARE_DYNAMIC_CLASS(wxBitmap)
friend class WXDLLEXPORT wxBitmapHandler;
public:
wxBitmap(); // Platform-specific
// Copy constructors
wxBitmap(const wxBitmap& bitmap)
: wxBitmapBase()
{ Ref(bitmap); }
// Initialize with raw data.
wxBitmap(const char bits[], int width, int height, int depth = 1);
// Initialize with XPM data
bool CreateFromXpm(const char **bits);
wxBitmap(const char **bits);
wxBitmap(char **bits);
// Load a file or resource
wxBitmap(const wxString& name, wxBitmapType type = wxBITMAP_TYPE_PICT_RESOURCE);
// Constructor for generalised creation from data
wxBitmap(void *data, wxBitmapType type, int width, int height, int depth = 1);
// If depth is omitted, will create a bitmap compatible with the display
wxBitmap(int width, int height, int depth = -1);
// Convert from wxImage:
wxBitmap(const wxImage& image, int depth = -1);
~wxBitmap();
wxImage ConvertToImage() const;
// get the given part of bitmap
wxBitmap GetSubBitmap( const wxRect& rect ) const;
virtual bool Create(int width, int height, int depth = -1);
virtual bool Create(void *data, wxBitmapType type, int width, int height, int depth = 1);
virtual bool LoadFile(const wxString& name, wxBitmapType type = wxBITMAP_TYPE_BMP_RESOURCE);
virtual bool SaveFile(const wxString& name, wxBitmapType type, const wxPalette *cmap = NULL) const;
// copies the contents and mask of the given (colour) icon to the bitmap
virtual bool CopyFromIcon(const wxIcon& icon);
bool Ok() const;
int GetWidth() const;
int GetHeight() const;
int GetDepth() const;
int GetQuality() const;
void SetWidth(int w);
void SetHeight(int h);
void SetDepth(int d);
void SetQuality(int q);
void SetOk(bool isOk);
#if wxUSE_PALETTE
wxPalette* GetPalette() const;
void SetPalette(const wxPalette& palette);
#endif // wxUSE_PALETTE
wxMask *GetMask() const;
void SetMask(wxMask *mask) ;
int GetBitmapType() const;
inline wxBitmap& operator = (const wxBitmap& bitmap) { if (*this == bitmap) return (*this); Ref(bitmap); return *this; }
inline bool operator == (const wxBitmap& bitmap) const { return m_refData == bitmap.m_refData; }
inline bool operator != (const wxBitmap& bitmap) const { return m_refData != bitmap.m_refData; }
static void InitStandardHandlers();
// raw bitmap access support functions, for internal use only
void *GetRawData(wxPixelDataBase& data, int bpp);
void UngetRawData(wxPixelDataBase& data);
void UseAlpha();
public:
WXHBITMAP GetHBITMAP() const;
inline WXHICON GetHICON() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_hIcon : 0); }
WXHMETAFILE GetPict(bool *created = NULL ) const;
void SetHBITMAP(WXHBITMAP bmp);
void SetHICON(WXHICON ico);
void SetPict( WXHMETAFILE pict ) ;
bool FreeResource(bool force = FALSE);
};
#endif
// _WX_BITMAP_H_

View File

@@ -0,0 +1,57 @@
/////////////////////////////////////////////////////////////////////////////
// Name: bmpbuttn.h
// Purpose: wxBitmapButton class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BMPBUTTN_H_
#define _WX_BMPBUTTN_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "bmpbuttn.h"
#endif
#include "wx/button.h"
WXDLLEXPORT_DATA(extern const wxChar*) wxButtonNameStr;
#define wxDEFAULT_BUTTON_MARGIN 4
class WXDLLEXPORT wxBitmapButton: public wxBitmapButtonBase
{
DECLARE_DYNAMIC_CLASS(wxBitmapButton)
public:
wxBitmapButton()
{
SetMargins(wxDEFAULT_BUTTON_MARGIN, wxDEFAULT_BUTTON_MARGIN);
}
wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr)
{
Create(parent, id, bitmap, pos, size, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
virtual void SetBitmapLabel(const wxBitmap& bitmap);
protected:
virtual wxSize DoGetBestSize() const;
};
#endif
// _WX_BMPBUTTN_H_

View File

@@ -0,0 +1,82 @@
/////////////////////////////////////////////////////////////////////////////
// Name: brush.h
// Purpose: wxBrush class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BRUSH_H_
#define _WX_BRUSH_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "brush.h"
#endif
#include "wx/gdicmn.h"
#include "wx/gdiobj.h"
#include "wx/bitmap.h"
class WXDLLEXPORT wxBrush;
typedef enum
{
kwxMacBrushColour ,
kwxMacBrushTheme ,
kwxMacBrushThemeBackground
} wxMacBrushKind ;
// Brush
class WXDLLEXPORT wxBrush: public wxGDIObject
{
DECLARE_DYNAMIC_CLASS(wxBrush)
public:
wxBrush();
wxBrush(short macThemeBrush ) ;
wxBrush(const wxColour& col, int style = wxSOLID);
wxBrush(const wxBitmap& stipple);
wxBrush(const wxBrush& brush)
: wxGDIObject()
{ Ref(brush); }
~wxBrush();
virtual void SetColour(const wxColour& col) ;
virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
virtual void SetStyle(int style) ;
virtual void SetStipple(const wxBitmap& stipple) ;
virtual void MacSetTheme(short macThemeBrush) ;
virtual void MacSetThemeBackground(unsigned long macThemeBackground , WXRECTPTR extent) ;
wxBrush& operator = (const wxBrush& brush)
{ if (*this == brush) return (*this); Ref(brush); return *this; }
bool operator == (const wxBrush& brush)
{ return m_refData == brush.m_refData; }
bool operator != (const wxBrush& brush)
{ return m_refData != brush.m_refData; }
wxMacBrushKind MacGetBrushKind() const ;
unsigned long MacGetThemeBackground(WXRECTPTR extent) const ;
short MacGetTheme() const ;
wxColour& GetColour() const ;
int GetStyle() const ;
wxBitmap *GetStipple() const ;
virtual bool Ok() const { return (m_refData != NULL) ; }
// Implementation
// Useful helper: create the brush resource
bool RealizeResource();
// When setting properties, we must make sure we're not changing
// another object
void Unshare();
};
#endif
// _WX_BRUSH_H_

View File

@@ -0,0 +1,55 @@
/////////////////////////////////////////////////////////////////////////////
// Name: button.h
// Purpose: wxButton class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BUTTON_H_
#define _WX_BUTTON_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "button.h"
#endif
#include "wx/control.h"
#include "wx/gdicmn.h"
WXDLLEXPORT_DATA(extern const wxChar*) wxButtonNameStr;
// Pushbutton
class WXDLLEXPORT wxButton: public wxButtonBase
{
DECLARE_DYNAMIC_CLASS(wxButton)
public:
inline wxButton() {}
inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ;
static wxSize GetDefaultSize();
virtual void SetDefault();
virtual void Command(wxCommandEvent& event);
protected:
virtual wxSize DoGetBestSize() const ;
};
#endif
// _WX_BUTTON_H_

View File

@@ -0,0 +1,84 @@
/////////////////////////////////////////////////////////////////////////////
// Name: checkbox.h
// Purpose: wxCheckBox class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CHECKBOX_H_
#define _WX_CHECKBOX_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "checkbox.h"
#endif
// Checkbox item (single checkbox)
class WXDLLEXPORT wxCheckBox : public wxCheckBoxBase
{
public:
wxCheckBox() { }
wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr);
virtual void SetValue(bool);
virtual bool GetValue() const;
void DoSet3StateValue(wxCheckBoxState val);
virtual wxCheckBoxState DoGet3StateValue() const;
virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown );
virtual void Command(wxCommandEvent& event);
DECLARE_DYNAMIC_CLASS(wxCheckBox)
};
class WXDLLEXPORT wxBitmap;
class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
{
public:
int checkWidth;
int checkHeight;
wxBitmapCheckBox()
: checkWidth(-1), checkHeight(-1)
{ }
wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr);
virtual void SetValue(bool);
virtual bool GetValue() const;
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
virtual void SetLabel(const wxBitmap *bitmap);
virtual void SetLabel( const wxString & WXUNUSED(name) ) {}
DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
};
#endif
// _WX_CHECKBOX_H_

View File

@@ -0,0 +1,105 @@
///////////////////////////////////////////////////////////////////////////////
// Name: checklst.h
// Purpose: wxCheckListBox class - a listbox with checkable items
// Note: this is an optional class.
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CHECKLST_H_
#define _WX_CHECKLST_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "checklst.h"
#endif
#if !defined(__MWERKS__) && !defined(__UNIX__)
typedef unsigned int size_t;
#endif
class WXDLLEXPORT wxCheckListBox : public wxCheckListBoxBase
{
DECLARE_DYNAMIC_CLASS(wxCheckListBox)
public:
// ctors
wxCheckListBox() { Init(); }
wxCheckListBox(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int nStrings = 0,
const wxString *choices = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr)
{
Init();
Create(parent, id, pos, size, nStrings, choices, style, validator, name);
}
wxCheckListBox(wxWindow *parent,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
const wxArrayString& choices,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr)
{
Init();
Create(parent, id, pos, size, choices, style, validator, name);
}
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int nStrings = 0,
const wxString *choices = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr);
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
const wxArrayString& choices,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr);
// items may be checked
bool IsChecked(size_t uiIndex) const;
void Check(size_t uiIndex, bool bCheck = TRUE);
void OnChar(wxKeyEvent& event) ;
void OnLeftClick(wxMouseEvent& event) ;
// metrics
wxInt32 m_checkBoxWidth;
wxInt32 m_checkBoxHeight;
wxInt32 m_TextBaseLineOffset;
// the array containing the checked status of the items
wxArrayInt m_checks;
// override all methods which add/delete items to update m_checks array as
// well
virtual void Delete(int n);
protected:
virtual int DoAppend(const wxString& item);
virtual void DoInsertItems(const wxArrayString& items, int pos);
virtual void DoSetItems(const wxArrayString& items, void **clientData);
virtual void DoClear();
// common part of all ctors
void Init();
private:
DECLARE_EVENT_TABLE()
};
#endif
// _WX_CHECKLST_H_

View File

@@ -0,0 +1,30 @@
/*
* Name: wx/mac/chkconf.h
* Purpose: Compiler-specific configuration checking
* Author: Julian Smart
* Modified by:
* Created: 01/02/97
* RCS-ID: $Id$
* Copyright: (c) Julian Smart
* Licence: wxWindows licence
*/
#ifndef _WX_MAC_CHKCONF_H_
#define _WX_MAC_CHKCONF_H_
/*
* disable the settings which don't work for some compilers
*/
/*
* wxUSE_DEBUG_NEW_ALWAYS doesn't work with CodeWarrior
*/
#if defined(__MWERKS__)
#undef wxUSE_DEBUG_NEW_ALWAYS
#define wxUSE_DEBUG_NEW_ALWAYS 0
#endif
#endif
/* _WX_MAC_CHKCONF_H_ */

View File

@@ -0,0 +1,111 @@
/////////////////////////////////////////////////////////////////////////////
// Name: choice.h
// Purpose: wxChoice class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CHOICE_H_
#define _WX_CHOICE_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "choice.h"
#endif
#include "wx/control.h"
#include "wx/dynarray.h"
#include "wx/arrstr.h"
WXDLLEXPORT_DATA(extern const wxChar*) wxChoiceNameStr;
WX_DEFINE_ARRAY( char * , wxChoiceDataArray ) ;
// Choice item
class WXDLLEXPORT wxChoice: public wxChoiceBase
{
DECLARE_DYNAMIC_CLASS(wxChoice)
public:
wxChoice()
: m_strings(), m_datas(), m_macPopUpMenuHandle(NULL)
{}
virtual ~wxChoice() ;
wxChoice(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr)
{
Create(parent, id, pos, size, n, choices, style, validator, name);
}
wxChoice(wxWindow *parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
const wxArrayString& choices,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr)
{
Create(parent, id, pos, size, choices, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr);
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
const wxArrayString& choices,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr);
// implement base class pure virtuals
virtual int DoAppend(const wxString& item);
virtual int DoInsert(const wxString& item, int pos);
virtual void Delete(int n);
virtual void Clear();
virtual int GetCount() const ;
virtual int GetSelection() const ;
virtual void SetSelection(int n);
virtual int FindString(const wxString& s) const;
virtual wxString GetString(int n) const ;
virtual void SetString( int , const wxString& s ) ;
void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ;
protected:
virtual wxSize DoGetBestSize() const ;
public: // for wxComboBox only
virtual void DoSetItemClientData( int n, void* clientData );
virtual void* DoGetItemClientData( int n ) const;
virtual void DoSetItemClientObject( int n, wxClientData* clientData );
virtual wxClientData* DoGetItemClientObject( int n ) const;
protected:
// free all memory we have (used by Clear() and dtor)
// prevent collision with some BSD definitions of macro Free()
void FreeData();
wxArrayString m_strings;
wxChoiceDataArray m_datas ;
WXHMENU m_macPopUpMenuHandle ;
};
#endif
// _WX_CHOICE_H_

View File

@@ -0,0 +1,81 @@
/////////////////////////////////////////////////////////////////////////////
// Name: clipbrd.h
// Purpose: Clipboard functionality.
// Note: this functionality is under review, and
// is derived from wxWindows 1.xx code. Please contact
// the wxWindows developers for further information.
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CLIPBRD_H_
#define _WX_CLIPBRD_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "clipbrd.h"
#endif
#if wxUSE_CLIPBOARD
#include "wx/list.h"
#include "wx/module.h"
#include "wx/dataobj.h" // for wxDataFormat
//-----------------------------------------------------------------------------
// wxClipboard
//-----------------------------------------------------------------------------
class WXDLLEXPORT wxDataObject;
class WXDLLEXPORT wxClipboard : public wxClipboardBase
{
DECLARE_DYNAMIC_CLASS(wxClipboard)
public:
wxClipboard();
~wxClipboard();
// open the clipboard before SetData() and GetData()
virtual bool Open();
// close the clipboard after SetData() and GetData()
virtual void Close();
// query whether the clipboard is opened
virtual bool IsOpened() const;
// set the clipboard data. all other formats will be deleted.
virtual bool SetData( wxDataObject *data );
// add to the clipboard data.
virtual bool AddData( wxDataObject *data );
// ask if data in correct format is available
virtual bool IsSupported( const wxDataFormat& format );
// fill data with data on the clipboard (if available)
virtual bool GetData( wxDataObject& data );
// clears wxTheClipboard and the system's clipboard if possible
virtual void Clear();
// flushes the clipboard: this means that the data which is currently on
// clipboard will stay available even after the application exits (possibly
// eating memory), otherwise the clipboard will be emptied on exit
virtual bool Flush();
// X11 has two clipboards which get selected by this call. Empty on MSW.
void UsePrimarySelection( bool WXUNUSED(primary) = FALSE ) { }
private:
wxDataObject *m_data;
bool m_open;
};
#endif // wxUSE_CLIPBOARD
#endif
// _WX_CLIPBRD_H_

View File

@@ -0,0 +1,46 @@
/////////////////////////////////////////////////////////////////////////////
// Name: colordlg.h
// Purpose: wxColourDialog class. Use generic version if no
// platform-specific implementation.
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_COLORDLG_H_
#define _WX_COLORDLG_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "colordlg.h"
#endif
#include "wx/setup.h"
#include "wx/dialog.h"
#include "wx/cmndata.h"
/*
* Platform-specific colour dialog implementation
*/
class WXDLLEXPORT wxColourDialog: public wxDialog
{
DECLARE_DYNAMIC_CLASS(wxColourDialog)
public:
wxColourDialog();
wxColourDialog(wxWindow *parent, wxColourData *data = NULL);
bool Create(wxWindow *parent, wxColourData *data = NULL);
int ShowModal();
wxColourData& GetColourData() { return m_colourData; }
protected:
wxColourData m_colourData;
wxWindow* m_dialogParent;
};
#endif
// _WX_COLORDLG_H_

View File

@@ -0,0 +1,101 @@
/////////////////////////////////////////////////////////////////////////////
// Name: colour.h
// Purpose: wxColour class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_COLOUR_H_
#define _WX_COLOUR_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "colour.h"
#endif
#include "wx/object.h"
#include "wx/string.h"
// Colour
class WXDLLEXPORT wxColour: public wxObject
{
public:
// ctors
// default
wxColour() { Init(); }
// from RGB
wxColour( unsigned char red, unsigned char green, unsigned char blue )
{ Set(red, green, blue); }
wxColour( unsigned long colRGB )
{ Set(colRGB); }
// implicit conversion from the colour name
wxColour( const wxString &colourName )
{ InitFromName(colourName); }
wxColour( const wxChar *colourName )
{ InitFromName(colourName); }
// copy ctors and assignment operators
wxColour( const wxColour& col );
wxColour( const wxColour* col );
wxColour& operator = ( const wxColour& col );
// dtor
~wxColour();
// Set() functions
void Set( unsigned char red, unsigned char green, unsigned char blue );
void Set( unsigned long colRGB )
{
// we don't need to know sizeof(long) here because we assume that the three
// least significant bytes contain the R, G and B values
Set((unsigned char)colRGB,
(unsigned char)(colRGB >> 8),
(unsigned char)(colRGB >> 16));
}
// accessors
bool Ok() const {return m_isInit; }
unsigned char Red() const { return m_red; }
unsigned char Green() const { return m_green; }
unsigned char Blue() const { return m_blue; }
// comparison
bool operator == (const wxColour& colour) const
{
return (m_isInit == colour.m_isInit
&& m_red == colour.m_red
&& m_green == colour.m_green
&& m_blue == colour.m_blue);
}
bool operator != (const wxColour& colour) const { return !(*this == colour); }
const WXCOLORREF& GetPixel() const { return m_pixel; };
void InitFromName(const wxString& col);
protected :
// Helper function
void Init();
private:
bool m_isInit;
unsigned char m_red;
unsigned char m_blue;
unsigned char m_green;
public:
WXCOLORREF m_pixel ;
void Set( const WXCOLORREF* color ) ;
private:
DECLARE_DYNAMIC_CLASS(wxColour)
};
#endif
// _WX_COLOUR_H_

View File

@@ -0,0 +1,136 @@
/////////////////////////////////////////////////////////////////////////////
// Name: combobox.h
// Purpose: wxComboBox class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_COMBOBOX_H_
#define _WX_COMBOBOX_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "combobox.h"
#endif
#include "wx/textctrl.h"
#include "wx/choice.h"
WXDLLEXPORT_DATA(extern const wxChar*) wxComboBoxNameStr;
// Combobox item
class WXDLLEXPORT wxComboBox : public wxControl, public wxComboBoxBase
{
DECLARE_DYNAMIC_CLASS(wxComboBox)
public:
inline wxComboBox() {}
virtual ~wxComboBox();
// override the base class virtuals involved in geometry calculations
virtual wxSize DoGetBestSize() const;
virtual void DoMoveWindow(int x, int y, int width, int height);
// forward these functions to all subcontrols
virtual bool Enable(bool enable = TRUE);
virtual bool Show(bool show = TRUE);
virtual void SetFocus();
// callback functions
virtual void DelegateTextChanged( const wxString& value );
virtual void DelegateChoice( const wxString& value );
inline wxComboBox(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
{
Create(parent, id, value, pos, size, n, choices, style, validator, name);
}
inline wxComboBox(wxWindow *parent, wxWindowID id,
const wxString& value,
const wxPoint& pos,
const wxSize& size,
const wxArrayString& choices,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
{
Create(parent, id, value, pos, size, choices, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr);
bool Create(wxWindow *parent, wxWindowID id,
const wxString& value,
const wxPoint& pos,
const wxSize& size,
const wxArrayString& choices,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr);
// List functions
virtual void Delete(int n);
virtual void Clear();
virtual int GetSelection() const ;
virtual void SetSelection(int n);
virtual void Select(int n) { SetSelection(n) ; }
virtual int FindString(const wxString& s) const;
virtual wxString GetString(int n) const ;
virtual wxString GetStringSelection() const ;
virtual void SetString(int n, const wxString& s) ;
virtual bool SetStringSelection(const wxString& sel);
// Text field functions
virtual wxString GetValue() const ;
virtual void SetValue(const wxString& value);
// Clipboard operations
virtual void Copy();
virtual void Cut();
virtual void Paste();
virtual void SetInsertionPoint(long pos);
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 SetEditable(bool editable);
virtual int GetCount() const { return m_choice->GetCount() ; }
void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ;
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
protected:
virtual int DoAppend(const wxString& item) ;
virtual int DoInsert(const wxString& item, int pos) ;
virtual void DoSetItemClientData(int n, void* clientData) ;
virtual void* DoGetItemClientData(int n) const ;
virtual void DoSetItemClientObject(int n, wxClientData* clientData) ;
virtual wxClientData* DoGetItemClientObject(int n) const ;
void FreeData();
// the subcontrols
wxTextCtrl* m_text;
wxChoice* m_choice;
};
#endif
// _WX_COMBOBOX_H_

View File

@@ -0,0 +1,57 @@
/////////////////////////////////////////////////////////////////////////////
// Name: control.h
// Purpose: wxControl class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CONTROL_H_
#define _WX_CONTROL_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "control.h"
#endif
WXDLLEXPORT_DATA(extern const wxChar*) wxControlNameStr;
// General item class
class WXDLLEXPORT wxControl : public wxControlBase
{
DECLARE_ABSTRACT_CLASS(wxControl)
public:
wxControl();
wxControl(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxControlNameStr)
{
Create(parent, id, pos, size, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxControlNameStr);
virtual ~wxControl();
// Simulates an event
virtual void Command(wxCommandEvent& event) { ProcessCommand(event); }
// implementation from now on
// --------------------------
// Calls the callback and appropriate event handlers
bool ProcessCommand(wxCommandEvent& event);
void OnKeyDown( wxKeyEvent &event ) ;
};
#endif
// _WX_CONTROL_H_

View File

@@ -0,0 +1,85 @@
/////////////////////////////////////////////////////////////////////////////
// Name: cursor.h
// Purpose: wxCursor class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CURSOR_H_
#define _WX_CURSOR_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "cursor.h"
#endif
#include "wx/bitmap.h"
class WXDLLEXPORT wxCursorRefData: public wxBitmapRefData
{
DECLARE_NO_COPY_CLASS(wxCursorRefData)
friend class WXDLLEXPORT wxBitmap;
friend class WXDLLEXPORT wxCursor;
public:
wxCursorRefData();
~wxCursorRefData();
protected:
WXHCURSOR m_hCursor;
bool m_disposeHandle;
bool m_releaseHandle;
bool m_isColorCursor ;
long m_themeCursor ;
};
#define M_CURSORDATA ((wxCursorRefData *)m_refData)
#define M_CURSORHANDLERDATA ((wxCursorRefData *)bitmap->m_refData)
// Cursor
class WXDLLEXPORT wxCursor: public wxBitmap
{
DECLARE_DYNAMIC_CLASS(wxCursor)
public:
wxCursor();
// Copy constructors
wxCursor(const wxCursor& cursor)
: wxBitmap()
{ Ref(cursor); }
wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1,
const char maskBits[] = NULL);
wxCursor(const wxImage & image) ;
wxCursor(const char **bits) ;
wxCursor(char **bits) ;
wxCursor(const wxString& name, long flags = wxBITMAP_TYPE_MACCURSOR_RESOURCE,
int hotSpotX = 0, int hotSpotY = 0);
wxCursor(int cursor_type);
~wxCursor();
bool CreateFromXpm(const char **bits) ;
virtual bool Ok() const { return (m_refData != NULL && ( M_CURSORDATA->m_hCursor != NULL || M_CURSORDATA->m_themeCursor != -1 ) ) ; }
inline wxCursor& operator = (const wxCursor& cursor) { if (*this == cursor) return (*this); Ref(cursor); return *this; }
inline bool operator == (const wxCursor& cursor) { return m_refData == cursor.m_refData; }
inline bool operator != (const wxCursor& cursor) { return m_refData != cursor.m_refData; }
void MacInstall() const ;
void SetHCURSOR(WXHCURSOR cursor);
inline WXHCURSOR GetHCURSOR() const { return (M_CURSORDATA ? M_CURSORDATA->m_hCursor : 0); }
private :
void CreateFromImage(const wxImage & image) ;
};
extern WXDLLEXPORT void wxSetCursor(const wxCursor& cursor);
#endif
// _WX_CURSOR_H_

View File

@@ -0,0 +1,61 @@
///////////////////////////////////////////////////////////////////////////////
// Name: mac/dataform.h
// Purpose: declaration of the wxDataFormat class
// Author: Stefan Csomor (lifted from dnd.h)
// Modified by:
// Created: 10/21/99
// RCS-ID: $Id$
// Copyright: (c) 1999 Stefan Csomor
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MAC_DATAFORM_H
#define _WX_MAC_DATAFORM_H
class WXDLLEXPORT wxDataFormat
{
public:
typedef unsigned long NativeFormat;
wxDataFormat();
wxDataFormat(wxDataFormatId vType);
wxDataFormat(const wxString& rId);
wxDataFormat(const wxChar* pId);
wxDataFormat(NativeFormat vFormat);
wxDataFormat& operator=(NativeFormat vFormat)
{ SetId(vFormat); return *this; }
// comparison (must have both versions)
bool operator==(NativeFormat format) const
{ return m_format == (NativeFormat)format; }
bool operator!=(NativeFormat format) const
{ return m_format != (NativeFormat)format; }
bool operator==(wxDataFormatId format) const
{ return m_type == (wxDataFormatId)format; }
bool operator!=(wxDataFormatId format) const
{ return m_type != (wxDataFormatId)format; }
// explicit and implicit conversions to NativeFormat which is one of
// standard data types (implicit conversion is useful for preserving the
// compatibility with old code)
NativeFormat GetFormatId() const { return m_format; }
operator NativeFormat() const { return m_format; }
void SetId(NativeFormat format);
// string ids are used for custom types - this SetId() must be used for
// application-specific formats
wxString GetId() const;
void SetId(const wxChar* pId);
// implementation
wxDataFormatId GetType() const { return m_type; }
void SetType( wxDataFormatId type );
private:
wxDataFormatId m_type;
NativeFormat m_format;
};
#endif // _WX_MAC_DATAFORM_H

View File

@@ -0,0 +1,35 @@
///////////////////////////////////////////////////////////////////////////////
// Name: mac/dataobj.h
// Purpose: declaration of the wxDataObject
// Author: Stefan Csomor (adapted from Robert Roebling's gtk port)
// Modified by:
// Created: 10/21/99
// RCS-ID: $Id$
// Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MAC_DATAOBJ_H_
#define _WX_MAC_DATAOBJ_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "dataobj.h"
#endif
// ----------------------------------------------------------------------------
// wxDataObject is the same as wxDataObjectBase under wxGTK
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxDataObject : public wxDataObjectBase
{
public:
wxDataObject();
#ifdef __DARWIN__
~wxDataObject() { }
#endif
virtual bool IsSupportedFormat( const wxDataFormat& format, Direction dir = Get ) const;
};
#endif // _WX_MAC_DATAOBJ_H_

View File

@@ -0,0 +1,86 @@
///////////////////////////////////////////////////////////////////////////////
// Name: os2/dataobj2.h
// Purpose: declaration of standard wxDataObjectSimple-derived classes
// Author: David Webster (adapted from Robert Roebling's gtk port
// Modified by:
// Created: 10/21/99
// RCS-ID: $Id$
// Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_GTK_DATAOBJ2_H_
#define _WX_GTK_DATAOBJ2_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "dataobj.h"
#endif
// ----------------------------------------------------------------------------
// wxBitmapDataObject is a specialization of wxDataObject for bitmaps
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxBitmapDataObject : public wxBitmapDataObjectBase
{
public:
// ctors
wxBitmapDataObject();
wxBitmapDataObject(const wxBitmap& bitmap);
// destr
~wxBitmapDataObject();
// override base class virtual to update PNG data too
virtual void SetBitmap(const wxBitmap& bitmap);
// implement base class pure virtuals
// ----------------------------------
virtual size_t GetDataSize() const ;
virtual bool GetDataHere(void *buf) const ;
virtual bool SetData(size_t len, const void *buf);
protected :
void Init() ;
void Clear() ;
void* m_pictHandle ;
bool m_pictCreated ;
private:
// Virtual function hiding supression
size_t GetDataSize(const wxDataFormat& rFormat) const
{ return(wxDataObjectSimple::GetDataSize(rFormat)); }
bool GetDataHere(const wxDataFormat& rFormat, void* pBuf) const
{ return(wxDataObjectSimple::GetDataHere(rFormat, pBuf)); }
bool SetData(const wxDataFormat& rFormat, size_t nLen, const void* pBuf)
{ return(wxDataObjectSimple::SetData(rFormat, nLen, pBuf)); }
};
// ----------------------------------------------------------------------------
// wxFileDataObject is a specialization of wxDataObject for file names
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxFileDataObject : public wxFileDataObjectBase
{
public:
// implement base class pure virtuals
// ----------------------------------
void AddFile( const wxString &filename );
virtual size_t GetDataSize() const;
virtual bool GetDataHere(void *buf) const;
virtual bool SetData(size_t len, const void *buf);
private:
// Virtual function hiding supression
size_t GetDataSize(const wxDataFormat& rFormat) const
{ return(wxDataObjectSimple::GetDataSize(rFormat)); }
bool GetDataHere(const wxDataFormat& rFormat, void* pBuf) const
{ return(wxDataObjectSimple::GetDataHere(rFormat, pBuf)); }
bool SetData(const wxDataFormat& rFormat, size_t nLen, const void* pBuf)
{ return(wxDataObjectSimple::SetData(rFormat, nLen, pBuf)); }
};
#endif // _WX_GTK_DATAOBJ2_H_

293
include/wx/mac/carbon/dc.h Normal file
View File

@@ -0,0 +1,293 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dc.h
// Purpose: wxDC class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DC_H_
#define _WX_DC_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "dc.h"
#endif
#include "wx/pen.h"
#include "wx/brush.h"
#include "wx/icon.h"
#include "wx/font.h"
#include "wx/gdicmn.h"
//-----------------------------------------------------------------------------
// constants
//-----------------------------------------------------------------------------
#ifndef MM_TEXT
#define MM_TEXT 0
#define MM_ISOTROPIC 1
#define MM_ANISOTROPIC 2
#define MM_LOMETRIC 3
#define MM_HIMETRIC 4
#define MM_TWIPS 5
#define MM_POINTS 6
#define MM_METRIC 7
#endif
//-----------------------------------------------------------------------------
// global variables
//-----------------------------------------------------------------------------
extern int wxPageNumber;
class wxMacPortStateHelper ;
//-----------------------------------------------------------------------------
// wxDC
//-----------------------------------------------------------------------------
class WXDLLEXPORT wxDC: public wxDCBase
{
DECLARE_DYNAMIC_CLASS(wxDC)
DECLARE_NO_COPY_CLASS(wxDC)
public:
wxDC();
~wxDC();
// implement base class pure virtuals
// ----------------------------------
virtual void Clear();
virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return TRUE; }
virtual void EndDoc(void) {};
virtual void StartPage(void) {};
virtual void EndPage(void) {};
virtual void SetFont(const wxFont& font);
virtual void SetPen(const wxPen& pen);
virtual void SetBrush(const wxBrush& brush);
virtual void SetBackground(const wxBrush& brush);
virtual void SetBackgroundMode(int mode);
virtual void SetPalette(const wxPalette& palette);
virtual void DestroyClippingRegion();
virtual wxCoord GetCharHeight() const;
virtual wxCoord GetCharWidth() const;
virtual void DoGetTextExtent(const wxString& string,
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
wxFont *theFont = NULL) const;
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
virtual bool CanDrawBitmap() const;
virtual bool CanGetTextExtent() const;
virtual int GetDepth() const;
virtual wxSize GetPPI() const;
virtual void SetMapMode(int mode);
virtual void SetUserScale(double x, double y);
virtual void SetLogicalScale(double x, double y);
virtual void SetLogicalOrigin(wxCoord x, wxCoord y);
virtual void SetDeviceOrigin(wxCoord x, wxCoord y);
virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
virtual void SetLogicalFunction(int function);
virtual void SetTextForeground(const wxColour& colour) ;
virtual void SetTextBackground(const wxColour& colour) ;
void ComputeScaleAndOrigin(void);
public:
wxCoord XDEV2LOG(wxCoord x) const
{
long new_x = x - m_deviceOriginX ;
if (new_x > 0)
return (wxCoord)((double)(new_x) / m_scaleX + 0.5) * m_signX + m_logicalOriginX;
else
return (wxCoord)((double)(new_x) / m_scaleX - 0.5) * m_signX + m_logicalOriginX;
}
wxCoord XDEV2LOGREL(wxCoord x) const
{
if (x > 0)
return (wxCoord)((double)(x) / m_scaleX + 0.5);
else
return (wxCoord)((double)(x) / m_scaleX - 0.5);
}
wxCoord YDEV2LOG(wxCoord y) const
{
long new_y = y - m_deviceOriginY ;
if (new_y > 0)
return (wxCoord)((double)(new_y) / m_scaleY + 0.5) * m_signY + m_logicalOriginY;
else
return (wxCoord)((double)(new_y) / m_scaleY - 0.5) * m_signY + m_logicalOriginY;
}
wxCoord YDEV2LOGREL(wxCoord y) const
{
if (y > 0)
return (wxCoord)((double)(y) / m_scaleY + 0.5);
else
return (wxCoord)((double)(y) / m_scaleY - 0.5);
}
wxCoord XLOG2DEV(wxCoord x) const
{
long new_x = x - m_logicalOriginX;
if (new_x > 0)
return (wxCoord)((double)(new_x) * m_scaleX + 0.5) * m_signX + m_deviceOriginX ;
else
return (wxCoord)((double)(new_x) * m_scaleX - 0.5) * m_signX + m_deviceOriginX ;
}
wxCoord XLOG2DEVREL(wxCoord x) const
{
if (x > 0)
return (wxCoord)((double)(x) * m_scaleX + 0.5);
else
return (wxCoord)((double)(x) * m_scaleX - 0.5);
}
wxCoord YLOG2DEV(wxCoord y) const
{
long new_y = y - m_logicalOriginY ;
if (new_y > 0)
return (wxCoord)((double)(new_y) * m_scaleY + 0.5) * m_signY + m_deviceOriginY ;
else
return (wxCoord)((double)(new_y) * m_scaleY - 0.5) * m_signY + m_deviceOriginY ;
}
wxCoord YLOG2DEVREL(wxCoord y) const
{
if (y > 0)
return (wxCoord)((double)(y) * m_scaleY + 0.5);
else
return (wxCoord)((double)(y) * m_scaleY - 0.5);
}
wxCoord XLOG2DEVMAC(wxCoord x) const
{
long new_x = x - m_logicalOriginX;
if (new_x > 0)
return (wxCoord)((double)(new_x) * m_scaleX + 0.5) * m_signX + m_deviceOriginX + m_macLocalOrigin.x ;
else
return (wxCoord)((double)(new_x) * m_scaleX - 0.5) * m_signX + m_deviceOriginX + m_macLocalOrigin.x ;
}
wxCoord YLOG2DEVMAC(wxCoord y) const
{
long new_y = y - m_logicalOriginY ;
if (new_y > 0)
return (wxCoord)((double)(new_y) * m_scaleY + 0.5) * m_signY + m_deviceOriginY + m_macLocalOrigin.y ;
else
return (wxCoord)((double)(new_y) * m_scaleY - 0.5) * m_signY + m_deviceOriginY + m_macLocalOrigin.y ;
}
WXHRGN MacGetCurrentClipRgn() { return m_macCurrentClipRgn ; }
static void MacSetupBackgroundForCurrentPort(const wxBrush& background ) ;
//
protected:
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
int style = wxFLOOD_SURFACE);
virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const;
virtual void DoDrawPoint(wxCoord x, wxCoord y);
virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
virtual void DoDrawArc(wxCoord x1, wxCoord y1,
wxCoord x2, wxCoord y2,
wxCoord xc, wxCoord yc);
virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
double sa, double ea);
virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y,
wxCoord width, wxCoord height,
double radius);
virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
virtual void DoCrossHair(wxCoord x, wxCoord y);
virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
bool useMask = FALSE);
virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y);
virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
double angle);
virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc,
int rop = wxCOPY, bool useMask = FALSE, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
// this is gnarly - we can't even call this function DoSetClippingRegion()
// because of virtual function hiding
virtual void DoSetClippingRegionAsRegion(const wxRegion& region);
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
wxCoord width, wxCoord height);
virtual void DoGetClippingRegion(wxCoord *x, wxCoord *y,
wxCoord *width, wxCoord *height)
{
GetClippingBox(x, y, width, height);
}
virtual void DoGetSizeMM(int* width, int* height) const;
virtual void DoDrawLines(int n, wxPoint points[],
wxCoord xoffset, wxCoord yoffset);
virtual void DoDrawPolygon(int n, wxPoint points[],
wxCoord xoffset, wxCoord yoffset,
int fillStyle = wxODDEVEN_RULE);
protected:
//begin wxmac
// Variables used for scaling
double m_mm_to_pix_x,m_mm_to_pix_y;
// not yet used
bool m_needComputeScaleX,m_needComputeScaleY;
// If un-scrolled is non-zero or d.o. changes with scrolling.
// Set using SetInternalDeviceOrigin().
long m_internalDeviceOriginX,m_internalDeviceOriginY;
// To be set by external classes such as wxScrolledWindow
// using SetDeviceOrigin()
long m_externalDeviceOriginX,m_externalDeviceOriginY;
// Begin implementation for Mac
public:
WXHDC m_macPort ;
WXHBITMAP m_macMask ;
// in order to preserve the const inheritance of the virtual functions, we have to
// use mutable variables starting from CWPro 5
void MacInstallFont() const ;
void MacInstallPen() const ;
void MacInstallBrush() const ;
mutable bool m_macFontInstalled ;
mutable bool m_macPenInstalled ;
mutable bool m_macBrushInstalled ;
WXHRGN m_macBoundaryClipRgn ;
WXHRGN m_macCurrentClipRgn ;
wxPoint m_macLocalOrigin ;
void MacSetupPort( wxMacPortStateHelper* ph ) const ;
void MacCleanupPort( wxMacPortStateHelper* ph ) const ;
mutable void* m_macATSUIStyle ;
mutable wxMacPortStateHelper* m_macCurrentPortStateHelper ;
mutable bool m_macFormerAliasState ;
mutable short m_macFormerAliasSize ;
mutable bool m_macAliasWasEnabled ;
mutable void* m_macForegroundPixMap ;
mutable void* m_macBackgroundPixMap ;
};
#endif
// _WX_DC_H_

View File

@@ -0,0 +1,74 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dcclient.h
// Purpose: wxClientDC, wxPaintDC and wxWindowDC classes
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DCCLIENT_H_
#define _WX_DCCLIENT_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "dcclient.h"
#endif
#include "wx/dc.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class WXDLLEXPORT wxPaintDC;
class WXDLLEXPORT wxWindow;
class WXDLLEXPORT wxWindowDC: public wxDC
{
DECLARE_DYNAMIC_CLASS(wxWindowDC)
public:
wxWindowDC(void);
// Create a DC corresponding to a canvas
wxWindowDC(wxWindow *win);
~wxWindowDC(void);
virtual void DoGetSize( int *width, int *height ) const;
protected :
wxWindow *m_window;
};
class WXDLLEXPORT wxClientDC: public wxWindowDC
{
DECLARE_DYNAMIC_CLASS(wxClientDC)
public:
wxClientDC(void);
// Create a DC corresponding to a canvas
wxClientDC(wxWindow *win);
~wxClientDC(void);
virtual void DoGetSize( int *width, int *height ) const;
};
class WXDLLEXPORT wxPaintDC: public wxWindowDC
{
DECLARE_DYNAMIC_CLASS(wxPaintDC)
public:
wxPaintDC(void);
// Create a DC corresponding to a canvas
wxPaintDC(wxWindow *win);
~wxPaintDC(void);
virtual void DoGetSize( int *width, int *height ) const;
};
#endif
// _WX_DCCLIENT_H_

View File

@@ -0,0 +1,37 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dcmemory.h
// Purpose: wxMemoryDC class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DCMEMORY_H_
#define _WX_DCMEMORY_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "dcmemory.h"
#endif
#include "wx/dcclient.h"
class WXDLLEXPORT wxMemoryDC: public wxPaintDC
{
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
public:
wxMemoryDC(void);
wxMemoryDC( wxDC *dc ); // Create compatible DC
~wxMemoryDC(void);
virtual void SelectObject( const wxBitmap& bitmap );
virtual void DoGetSize( int *width, int *height ) const;
wxBitmap GetSelectedObject() { return m_selected ; }
private:
wxBitmap m_selected;
};
#endif
// _WX_DCMEMORY_H_

View File

@@ -0,0 +1,49 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dcprint.h
// Purpose: wxPrinterDC class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DCPRINT_H_
#define _WX_DCPRINT_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "dcprint.h"
#endif
#include "wx/dc.h"
#include "wx/cmndata.h"
class wxNativePrinterDC ;
class WXDLLEXPORT wxPrinterDC: public wxDC
{
public:
DECLARE_CLASS(wxPrinterDC)
#if wxUSE_PRINTING_ARCHITECTURE
// Create a printer DC
wxPrinterDC(const wxPrintData& printdata );
~wxPrinterDC();
virtual bool StartDoc( const wxString& WXUNUSED(message) ) ;
virtual void EndDoc(void) ;
virtual void StartPage(void) ;
virtual void EndPage(void) ;
wxPrintData& GetPrintData() { return m_printData; }
virtual void DoGetSize( int *width, int *height ) const;
protected:
wxPrintData m_printData ;
wxNativePrinterDC* m_nativePrinterDC ;
#endif // wxUSE_PRINTING_ARCHITECTURE
};
#endif
// _WX_DCPRINT_H_

View File

@@ -0,0 +1,39 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dcscreen.h
// Purpose: wxScreenDC class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DCSCREEN_H_
#define _WX_DCSCREEN_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "dcscreen.h"
#endif
#include "wx/dcclient.h"
class WXDLLEXPORT wxScreenDC: public wxWindowDC
{
DECLARE_DYNAMIC_CLASS(wxScreenDC)
public:
// Create a DC representing the whole screen
wxScreenDC();
~wxScreenDC();
// Compatibility with X's requirements for
// drawing on top of all windows
static bool StartDrawingOnTop(wxWindow* WXUNUSED(window)) { return TRUE; }
static bool StartDrawingOnTop(wxRect* WXUNUSED(rect) = NULL) { return TRUE; }
static bool EndDrawingOnTop() { return TRUE; }
};
#endif
// _WX_DCSCREEN_H_

View File

@@ -0,0 +1,105 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dialog.h
// Purpose: wxDialog class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DIALOG_H_
#define _WX_DIALOG_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "dialog.h"
#endif
#include "wx/panel.h"
WXDLLEXPORT_DATA(extern const wxChar*) wxDialogNameStr;
WXDLLEXPORT_DATA(extern const wxChar*) wxDialogNameStr;
class WXDLLEXPORT wxMacToolTip ;
// Dialog boxes
class WXDLLEXPORT wxDialog : public wxDialogBase
{
DECLARE_DYNAMIC_CLASS(wxDialog)
public:
wxDialog();
// Constructor with a modal flag, but no window id - the old convention
wxDialog(wxWindow *parent,
const wxString& title, bool modal,
int x = -1, int y= -1, int width = 500, int height = 500,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = wxDialogNameStr)
{
long modalStyle = modal ? wxDIALOG_MODAL : wxDIALOG_MODELESS ;
Create(parent, -1, title, wxPoint(x, y), wxSize(width, height),
style | modalStyle, name);
}
// Constructor with no modal flag - the new convention.
wxDialog(wxWindow *parent, wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = wxDialogNameStr)
{
Create(parent, id, title, pos, size, style, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = wxDialogNameStr);
~wxDialog();
// virtual bool Destroy();
bool Show(bool show = true);
void SetModal(bool flag);
virtual bool IsModal() const;
// For now, same as Show(TRUE) but returns return code
virtual int ShowModal();
// may be called to terminate the dialog with the given return code
virtual void EndModal(int retCode);
// returns TRUE if we're in a modal loop
bool IsModalShowing() const;
// implementation
// --------------
// event handlers
void OnCharHook(wxKeyEvent& event);
void OnCloseWindow(wxCloseEvent& event);
// Standard buttons
void OnOK(wxCommandEvent& event);
void OnApply(wxCommandEvent& event);
void OnCancel(wxCommandEvent& event);
// Responds to colour changes
void OnSysColourChanged(wxSysColourChangedEvent& event);
// show modal dialog and enter modal loop
void DoShowModal();
private:
DECLARE_EVENT_TABLE()
};
#endif
// _WX_DIALOG_H_

View File

@@ -0,0 +1,50 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dirdlg.h
// Purpose: wxDirDialog class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DIRDLG_H_
#define _WX_DIRDLG_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "dirdlg.h"
#endif
class WXDLLEXPORT wxDirDialog : public wxDialog
{
public:
wxDirDialog(wxWindow *parent,
const wxString& message = wxDirSelectorPromptStr,
const wxString& defaultPath = _T(""),
long style = 0,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
const wxString& name = wxDirDialogNameStr);
void SetMessage(const wxString& message) { m_message = message; }
void SetPath(const wxString& path) { m_path = path; }
void SetStyle(long style) { m_dialogStyle = style; }
wxString GetMessage() const { return m_message; }
wxString GetPath() const { return m_path; }
long GetStyle() const { return m_dialogStyle; }
virtual int ShowModal();
protected:
wxString m_message;
long m_dialogStyle;
wxWindow * m_parent;
wxString m_path;
DECLARE_DYNAMIC_CLASS(wxDirDialog)
};
#endif
// _WX_DIRDLG_H_

View File

@@ -0,0 +1,46 @@
/////////////////////////////////////////////////////////////////////////////
// Name: display.h
// Purpose: wxDisplay class customization for Mac
// Author: Brian Victor
// Modified by: Royce Mitchell III
// Created: 06/21/02
// RCS-ID: $Id$
// Copyright: (c) wxWindows team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MAC_DISPLAY_H_
#define _WX_MAC_DISPLAY_H_
#include "wx/object.h"
#include "wx/display.h"
class wxDisplayMacPriv;
class wxRect;
class wxString;
class WXDLLEXPORT wxDisplay : public wxDisplayBase
{
public:
wxDisplay ( size_t index = 0 );
~wxDisplay();
virtual wxRect GetGeometry() const;
virtual int GetDepth() const;
virtual wxString GetName() const;
virtual wxArrayVideoModes
GetModes(const wxVideoMode& mode = wxDefaultVideoMode) const;
virtual wxVideoMode GetCurrentMode() const;
virtual bool ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode);
private:
wxDisplayMacPriv* m_priv;
DECLARE_NO_COPY_CLASS(wxDisplay)
};
#endif // _WX_MAC_DISPLAY_H_

114
include/wx/mac/carbon/dnd.h Normal file
View File

@@ -0,0 +1,114 @@
///////////////////////////////////////////////////////////////////////////////
// Name: dnd.h
// Purpose: Declaration of the wxDropTarget, wxDropSource class etc.
// Author: Stefan Csomor
// RCS-ID: $Id$
// Copyright: (c) 1998 Stefan Csomor
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DND_H_
#define _WX_DND_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "dnd.h"
#endif
#if wxUSE_DRAG_AND_DROP
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/string.h"
#include "wx/string.h"
#include "wx/dataobj.h"
#include "wx/cursor.h"
//-------------------------------------------------------------------------
// classes
//-------------------------------------------------------------------------
class WXDLLEXPORT wxWindow;
class WXDLLEXPORT wxDropTarget;
class WXDLLEXPORT wxTextDropTarget;
class WXDLLEXPORT wxFileDropTarget;
class WXDLLEXPORT wxDropSource;
// ----------------------------------------------------------------------------
// macros
// ----------------------------------------------------------------------------
// this macro may be used instead for wxDropSource ctor arguments: it will use
// the icon 'name' from an XPM file under GTK, but will expand to something
// else under MSW. If you don't use it, you will have to use #ifdef in the
// application code.
#define wxDROP_ICON(X) wxCursor( (const char**) X##_xpm )
//-------------------------------------------------------------------------
// wxDropTarget
//-------------------------------------------------------------------------
class WXDLLEXPORT wxDropTarget: public wxDropTargetBase
{
public:
wxDropTarget(wxDataObject *dataObject = (wxDataObject*) NULL );
virtual wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def);
virtual bool OnDrop(wxCoord x, wxCoord y);
virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);
virtual bool GetData();
bool CurrentDragHasSupportedFormat() ;
void SetCurrentDrag( void* drag ) { m_currentDrag = drag ; }
void* GetCurrentDrag() { return m_currentDrag ; }
protected :
void* m_currentDrag ;
};
//-------------------------------------------------------------------------
// wxDropSource
//-------------------------------------------------------------------------
class WXDLLEXPORT wxDropSource: public wxDropSourceBase
{
public:
// ctors: if you use default ctor you must call SetData() later!
//
// NB: the "wxWindow *win" parameter is unused and is here only for wxGTK
// compatibility, as well as both icon parameters
wxDropSource( wxWindow *win = (wxWindow *)NULL,
const wxCursor &cursorCopy = wxNullCursor,
const wxCursor &cursorMove = wxNullCursor,
const wxCursor &cursorStop = wxNullCursor);
/* constructor for setting one data object */
wxDropSource( wxDataObject& data,
wxWindow *win,
const wxCursor &cursorCopy = wxNullCursor,
const wxCursor &cursorMove = wxNullCursor,
const wxCursor &cursorStop = wxNullCursor);
~wxDropSource();
// do it (call this in response to a mouse button press, for example)
// params: if bAllowMove is false, data can be only copied
virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly);
wxWindow* GetWindow() { return m_window ; }
void SetCurrentDrag( void* drag ) { m_currentDrag = drag ; }
void* GetCurrentDrag() { return m_currentDrag ; }
bool MacInstallDefaultCursor(wxDragResult effect) ;
protected :
wxWindow *m_window;
void* m_currentDrag ;
};
#endif
// D&D
#endif
//_WX_DND_H_

View File

@@ -0,0 +1,50 @@
/////////////////////////////////////////////////////////////////////////////
// Name: filedlg.h
// Purpose: wxFileDialog class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_FILEDLG_H_
#define _WX_FILEDLG_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "filedlg.h"
#endif
//-------------------------------------------------------------------------
// wxFileDialog
//-------------------------------------------------------------------------
class WXDLLEXPORT wxFileDialog: public wxFileDialogBase
{
DECLARE_DYNAMIC_CLASS(wxFileDialog)
protected:
wxArrayString m_fileNames;
wxArrayString m_paths;
public:
wxFileDialog(wxWindow *parent,
const wxString& message = wxFileSelectorPromptStr,
const wxString& defaultDir = wxEmptyString,
const wxString& defaultFile = wxEmptyString,
const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
long style = 0,
const wxPoint& pos = wxDefaultPosition);
virtual void GetPaths(wxArrayString& paths) const { paths = m_paths; }
virtual void GetFilenames(wxArrayString& files) const { files = m_fileNames ; }
virtual int ShowModal();
// not supported for file dialog, RR
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
int WXUNUSED(width), int WXUNUSED(height),
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
};
#endif // _WX_FILEDLG_H_

View File

@@ -0,0 +1,119 @@
/////////////////////////////////////////////////////////////////////////////
// Name: font.h
// Purpose: wxFont class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_FONT_H_
#define _WX_FONT_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "font.h"
#endif
// ----------------------------------------------------------------------------
// wxFont
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxFont : public wxFontBase
{
public:
// ctors and such
wxFont() { Init(); }
wxFont(const wxFont& font)
: wxFontBase()
{
Init();
Ref(font);
}
wxFont(int size,
int family,
int style,
int weight,
bool underlined = FALSE,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
{
Init();
(void)Create(size, family, style, weight, underlined, face, encoding);
}
wxFont(const wxNativeFontInfo& info)
{
Init();
(void)Create(info);
}
wxFont(const wxString& fontDesc);
bool Create(int size,
int family,
int style,
int weight,
bool underlined = FALSE,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
bool Create(const wxNativeFontInfo& info);
bool MacCreateThemeFont( wxUint16 themeFontID ) ;
virtual ~wxFont();
// assignment
wxFont& operator=(const wxFont& font);
// implement base class pure virtuals
virtual int GetPointSize() const;
virtual int GetFamily() const;
virtual int GetStyle() const;
virtual int GetWeight() const;
virtual bool GetUnderlined() const;
virtual wxString GetFaceName() const;
virtual wxFontEncoding GetEncoding() const;
virtual const wxNativeFontInfo *GetNativeFontInfo() const;
virtual void SetPointSize(int pointSize);
virtual void SetFamily(int family);
virtual void SetStyle(int style);
virtual void SetWeight(int weight);
virtual void SetFaceName(const wxString& faceName);
virtual void SetUnderlined(bool underlined);
virtual void SetEncoding(wxFontEncoding encoding);
// implementation only from now on
// -------------------------------
virtual bool RealizeResource();
// Unofficial API, don't use
virtual void SetNoAntiAliasing( bool noAA = TRUE ) ;
virtual bool GetNoAntiAliasing() ;
// Mac-specific, risks to change, don't use in portable code
short MacGetFontNum() const;
short MacGetFontSize() const;
wxByte MacGetFontStyle() const;
wxUint32 MacGetATSUFontID() const;
wxUint32 MacGetATSUAdditionalQDStyles() const;
wxUint16 MacGetThemeFontID() const ;
protected:
// common part of all ctors
void Init();
void Unshare();
private:
DECLARE_DYNAMIC_CLASS(wxFont)
};
#endif
// _WX_FONT_H_

View File

@@ -0,0 +1,46 @@
/////////////////////////////////////////////////////////////////////////////
// Name: fontdlg.h
// Purpose: wxFontDialog class. Use generic version if no
// platform-specific implementation.
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_FONTDLG_H_
#define _WX_FONTDLG_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "fontdlg.h"
#endif
#include "wx/dialog.h"
#include "wx/cmndata.h"
/*
* Font dialog
*/
class WXDLLEXPORT wxFontDialog: public wxDialog
{
DECLARE_DYNAMIC_CLASS(wxFontDialog)
public:
wxFontDialog();
wxFontDialog(wxWindow *parent, const wxFontData& data);
bool Create(wxWindow *parent, const wxFontData& data);
int ShowModal();
wxFontData& GetFontData() { return m_fontData; }
protected:
wxWindow* m_dialogParent;
wxFontData m_fontData;
};
#endif
// _WX_FONTDLG_H_

View File

@@ -0,0 +1,120 @@
/////////////////////////////////////////////////////////////////////////////
// Name: frame.h
// Purpose: wxFrame class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_FRAME_H_
#define _WX_FRAME_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "frame.h"
#endif
#include "wx/window.h"
#include "wx/toolbar.h"
#include "wx/accel.h"
#include "wx/icon.h"
WXDLLEXPORT_DATA(extern const wxChar*) wxFrameNameStr;
WXDLLEXPORT_DATA(extern const wxChar*) wxToolBarNameStr;
class WXDLLEXPORT wxMenuBar;
class WXDLLEXPORT wxStatusBar;
class WXDLLEXPORT wxMacToolTip ;
class WXDLLEXPORT wxFrame: public wxFrameBase
{
public:
// construction
wxFrame() { Init(); }
wxFrame(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr)
{
Init();
Create(parent, id, title, pos, size, style, name);
}
bool Create(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr);
virtual ~wxFrame();
// implementation only from now on
// -------------------------------
// override some more virtuals
virtual bool Enable(bool enable = TRUE) ;
// event handlers
void OnActivate(wxActivateEvent& event);
void OnSysColourChanged(wxSysColourChangedEvent& event);
// Toolbar
#if wxUSE_TOOLBAR
virtual wxToolBar* CreateToolBar(long style = -1,
wxWindowID id = -1,
const wxString& name = wxToolBarNameStr);
virtual void PositionToolBar();
#endif // wxUSE_TOOLBAR
// Status bar
#if wxUSE_STATUSBAR
virtual wxStatusBar* OnCreateStatusBar(int number = 1,
long style = wxST_SIZEGRIP,
wxWindowID id = 0,
const wxString& name = wxStatusLineNameStr);
virtual void PositionStatusBar();
#endif // wxUSE_STATUSBAR
// tooltip management
#if wxUSE_TOOLTIPS
wxMacToolTip* GetToolTipCtrl() const { return m_hwndToolTip; }
void SetToolTipCtrl(wxMacToolTip *tt) { m_hwndToolTip = tt; }
wxMacToolTip* m_hwndToolTip ;
#endif // tooltips
// called by wxWindow whenever it gets focus
void SetLastFocus(wxWindow *win) { m_winLastFocused = win; }
wxWindow *GetLastFocus() const { return m_winLastFocused; }
protected:
// common part of all ctors
void Init();
// override base class virtuals
virtual void DoGetClientSize(int *width, int *height) const;
virtual void DoSetClientSize(int width, int height);
virtual void DetachMenuBar();
virtual void AttachMenuBar(wxMenuBar *menubar);
protected:
// the last focused child: we restore focus to it on activation
wxWindow *m_winLastFocused;
private:
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxFrame)
};
#endif
// _WX_FRAME_H_

View File

@@ -0,0 +1,67 @@
/////////////////////////////////////////////////////////////////////////////
// Name: gauge.h
// Purpose: wxGauge class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_GAUGE_H_
#define _WX_GAUGE_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "gauge.h"
#endif
#include "wx/control.h"
WXDLLEXPORT_DATA(extern const wxChar*) wxGaugeNameStr;
// Group box
class WXDLLEXPORT wxGauge: public wxGaugeBase
{
DECLARE_DYNAMIC_CLASS(wxGauge)
public:
inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; }
inline wxGauge(wxWindow *parent, wxWindowID id,
int range,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxGaugeNameStr)
{
Create(parent, id, range, pos, size, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id,
int range,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxGaugeNameStr);
void SetShadowWidth(int w);
void SetBezelFace(int w);
void SetRange(int r);
void SetValue(int pos);
int GetShadowWidth() const ;
int GetBezelFace() const ;
int GetRange() const ;
int GetValue() const ;
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
protected:
int m_rangeMax;
int m_gaugePos;
};
#endif
// _WX_GAUGE_H_

View File

@@ -0,0 +1,48 @@
/////////////////////////////////////////////////////////////////////////////
// Name: gdiobj.h
// Purpose: wxGDIObject class: base class for other GDI classes
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_GDIOBJ_H_
#define _WX_GDIOBJ_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "gdiobj.h"
#endif
#include "wx/object.h"
class WXDLLEXPORT wxGDIRefData: public wxObjectRefData {
public:
inline wxGDIRefData()
{
}
};
#define M_GDIDATA ((wxGDIRefData *)m_refData)
class WXDLLEXPORT wxGDIObject: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxGDIObject)
public:
wxGDIObject() : m_visible(FALSE) { }
~wxGDIObject() { }
bool IsNull() const { return (m_refData == 0); }
virtual bool GetVisible() { return m_visible; }
virtual void SetVisible(bool v) { m_visible = v; }
protected:
bool m_visible; // Can a pointer to this object be safely taken?
// - only if created within FindOrCreate...
};
#endif
// _WX_GDIOBJ_H_

View File

@@ -0,0 +1,134 @@
/////////////////////////////////////////////////////////////////////////////
// Name: glcanvas.h
// Purpose: wxGLCanvas, for using OpenGL with wxWindows under Macintosh
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
# pragma interface "glcanvas.h"
#endif
#ifndef _WX_GLCANVAS_H_
#define _WX_GLCANVAS_H_
#include "wx/setup.h"
#if wxUSE_GLCANVAS
#include "wx/palette.h"
#include "wx/scrolwin.h"
#include "wx/app.h"
#ifdef __DARWIN__
# include <OpenGL/gl.h>
# include <AGL/agl.h>
#else
# include <gl.h>
# include <agl.h>
#endif
//---------------------------------------------------------------------------
// Constants for attriblist
//---------------------------------------------------------------------------
enum
{
WX_GL_RGBA=1, /* use true color palette */
WX_GL_BUFFER_SIZE, /* bits for buffer if not WX_GL_RGBA */
WX_GL_LEVEL, /* 0 for main buffer, >0 for overlay, <0 for underlay */
WX_GL_DOUBLEBUFFER, /* use doublebuffer */
WX_GL_STEREO, /* use stereoscopic display */
WX_GL_AUX_BUFFERS, /* number of auxiliary buffers */
WX_GL_MIN_RED, /* use red buffer with most bits (> MIN_RED bits) */
WX_GL_MIN_GREEN, /* use green buffer with most bits (> MIN_GREEN bits) */
WX_GL_MIN_BLUE, /* use blue buffer with most bits (> MIN_BLUE bits) */
WX_GL_MIN_ALPHA, /* use blue buffer with most bits (> MIN_ALPHA bits) */
WX_GL_DEPTH_SIZE, /* bits for Z-buffer (0,16,32) */
WX_GL_STENCIL_SIZE, /* bits for stencil buffer */
WX_GL_MIN_ACCUM_RED, /* use red accum buffer with most bits (> MIN_ACCUM_RED bits) */
WX_GL_MIN_ACCUM_GREEN, /* use green buffer with most bits (> MIN_ACCUM_GREEN bits) */
WX_GL_MIN_ACCUM_BLUE, /* use blue buffer with most bits (> MIN_ACCUM_BLUE bits) */
WX_GL_MIN_ACCUM_ALPHA /* use blue buffer with most bits (> MIN_ACCUM_ALPHA bits) */
};
class WXDLLEXPORT wxGLCanvas; /* forward reference */
class WXDLLEXPORT wxGLContext: public wxObject
{
public:
wxGLContext(AGLPixelFormat fmt, wxGLCanvas *win,
const wxPalette& WXUNUSED(palette),
const wxGLContext *other /* for sharing display lists */
);
~wxGLContext();
void SetCurrent();
void Update(); // must be called after window drag/grows/zoom or clut change
void SetColour(const wxChar *colour);
void SwapBuffers();
inline wxWindow* GetWindow() const { return m_window; }
inline AGLDrawable GetDrawable() const { return m_drawable; }
public:
AGLContext m_glContext;
AGLDrawable m_drawable;
wxWindow* m_window;
};
class WXDLLEXPORT wxGLCanvas: public wxWindow
{
DECLARE_CLASS(wxGLCanvas)
public:
wxGLCanvas(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxString& name = wxT("GLCanvas") , int *attribList = 0, const wxPalette& palette = wxNullPalette);
wxGLCanvas( wxWindow *parent, const wxGLContext *shared = (wxGLContext *)NULL,
wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxT("GLCanvas"),
int *attribList = (int*) NULL, const wxPalette& palette = wxNullPalette );
wxGLCanvas( wxWindow *parent, const wxGLCanvas *shared = (wxGLCanvas *)NULL, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0,
const wxString& name = wxT("GLCanvas"), int *attribList = 0, const wxPalette& palette = wxNullPalette );
~wxGLCanvas();
bool Create(wxWindow *parent, const wxGLContext *shared, wxWindowID id,
const wxPoint& pos, const wxSize& size, long style, const wxString& name,
int *attribList, const wxPalette& palette);
void SetCurrent();
void SetColour(const wxChar *colour);
void SwapBuffers();
void UpdateContext();
void SetViewport();
virtual bool Show(bool show = TRUE) ;
// Unlike some other platforms, this must get called if you override it.
// It sets the viewport correctly and update the context.
// You shouldn't call glViewport yourself either (use SetViewport if you must reset it.)
void OnSize(wxSizeEvent& event);
virtual void MacSuperChangedPosition() ;
virtual void MacTopLevelWindowChangedPosition() ;
virtual void MacSuperShown( bool show ) ;
void MacUpdateView() ;
inline wxGLContext* GetContext() const { return m_glContext; }
protected:
wxGLContext* m_glContext;
bool m_macCanvasIsShown ;
DECLARE_EVENT_TABLE()
};
#endif // wxUSE_GLCANVAS
#endif // _WX_GLCANVAS_H_

View File

@@ -0,0 +1,93 @@
/* -------------------------------------------------------------------------
* Project: GSocket (Generic Socket) for WX
* Name: gsockunx.h
* Purpose: GSocket Macintosh header
* CVSID: $Id$
* -------------------------------------------------------------------------
*/
#ifndef __GSOCK_UNX_H
#define __GSOCK_UNX_H
#ifndef __GSOCKET_STANDALONE__
#include "wx/setup.h"
#endif
#if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__)
#ifndef __GSOCKET_STANDALONE__
#include "wx/gsocket.h"
#else
#include "gsocket.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef GSocket* GSocketPtr ;
/* Definition of GSocket */
struct _GSocket
{
wxMacNotifierTableRef m_mac_events ;
EndpointRef m_endpoint;
GAddress *m_local;
GAddress *m_peer;
GSocketError m_error;
int m_non_blocking;
int m_server;
int m_stream;
int m_oriented;
unsigned long m_timeout;
/* Callbacks */
GSocketEventFlags m_detected;
GSocketCallback m_cbacks[GSOCK_MAX_EVENT];
char *m_data[GSOCK_MAX_EVENT];
int m_takesEvents ;
};
/* Definition of GAddress */
struct _GAddress
{
UInt32 m_host ;
UInt16 m_port ;
GAddressType m_family;
GSocketError m_error;
};
/* Input / Output */
GSocketError _GSocket_Input_Timeout(GSocket *socket);
GSocketError _GSocket_Output_Timeout(GSocket *socket);
int _GSocket_Recv_Stream(GSocket *socket, char *buffer, int size);
int _GSocket_Recv_Dgram(GSocket *socket, char *buffer, int size);
int _GSocket_Send_Stream(GSocket *socket, const char *buffer, int size);
int _GSocket_Send_Dgram(GSocket *socket, const char *buffer, int size);
/* Callbacks */
void _GSocket_Enable_Events(GSocket *socket);
void _GSocket_Disable_Events(GSocket *socket);
void _GSocket_Internal_Proc(unsigned long e , void* data ) ;
/* GAddress */
GSocketError _GAddress_translate_from(GAddress *address,
InetAddress *addr );
GSocketError _GAddress_translate_to(GAddress *address,
InetAddress *addr);
GSocketError _GAddress_Init_INET(GAddress *address);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
#endif /* __GSOCK_UNX_H */

View File

@@ -0,0 +1,53 @@
/////////////////////////////////////////////////////////////////////////////
// Name: helpxxxx.h
// Purpose: Help system: native implementation for your system. Replace
// XXXX with suitable name.
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_HELPXXXX_H_
#define _WX_HELPXXXX_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "helpxxxx.h"
#endif
#include "wx/wx.h"
#include "wx/helpbase.h"
class WXDLLEXPORT wxXXXXHelpController: public wxHelpControllerBase
{
DECLARE_CLASS(wxXXXXHelpController)
public:
wxXXXXHelpController();
~wxXXXXHelpController();
// Must call this to set the filename and server name
virtual bool Initialize(const wxString& file);
// If file is "", reloads file given in Initialize
virtual bool LoadFile(const wxString& file = "");
virtual bool DisplayContents();
virtual bool DisplaySection(int sectionNo);
virtual bool DisplayBlock(long blockNo);
virtual bool KeywordSearch(const wxString& k,
wxHelpSearchMode mode = wxHELP_SEARCH_ALL);
virtual bool Quit();
virtual void OnQuit();
inline wxString GetHelpFile() const { return m_helpFile; }
protected:
wxString m_helpFile;
};
#endif
// _WX_HELPXXXX_H_

View File

@@ -0,0 +1,95 @@
/////////////////////////////////////////////////////////////////////////////
// Name: icon.h
// Purpose: wxIcon class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ICON_H_
#define _WX_ICON_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "icon.h"
#endif
#include "wx/bitmap.h"
// Icon
class WXDLLEXPORT wxIcon: public wxBitmap
{
public:
wxIcon();
// Copy constructors
wxIcon(const wxIcon& icon)
: wxBitmap()
{ Ref(icon); }
wxIcon(const char **data);
wxIcon(char **data);
wxIcon(const char bits[], int width , int height );
wxIcon(const wxString& name, int flags = wxBITMAP_TYPE_ICON_RESOURCE,
int desiredWidth = -1, int desiredHeight = -1);
wxIcon(const wxIconLocation& loc)
{
LoadFile(loc.GetFileName(), wxBITMAP_TYPE_ICON);
}
~wxIcon();
bool LoadFile(const wxString& name, wxBitmapType flags /* = wxBITMAP_TYPE_ICON_RESOURCE */ ,
int desiredWidth /* = -1 */ , int desiredHeight = -1);
bool LoadFile(const wxString& name ,wxBitmapType flags = wxBITMAP_TYPE_ICON_RESOURCE )
{ return LoadFile( name , flags , -1 , -1 ) ; }
wxIcon& operator=(const wxIcon& icon)
{ if (this != &icon) Ref(icon); return *this; }
bool operator==(const wxIcon& icon) const { return m_refData == icon.m_refData; }
bool operator!=(const wxIcon& icon) const { return !(*this == icon); }
// create from bitmap (which should have a mask unless it's monochrome):
// there shouldn't be any implicit bitmap -> icon conversion (i.e. no
// ctors, assignment operators...), but it's ok to have such function
void CopyFromBitmap(const wxBitmap& bmp);
DECLARE_DYNAMIC_CLASS(wxIcon)
};
/*
class WXDLLEXPORT wxICONFileHandler: public wxBitmapHandler
{
DECLARE_DYNAMIC_CLASS(wxICONFileHandler)
public:
inline wxICONFileHandler()
{
m_name = "ICO icon file";
m_extension = "ico";
m_type = wxBITMAP_TYPE_ICO;
};
virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
int desiredWidth = -1, int desiredHeight = -1);
};
*/
class WXDLLEXPORT wxICONResourceHandler: public wxBitmapHandler
{
DECLARE_DYNAMIC_CLASS(wxICONResourceHandler)
public:
inline wxICONResourceHandler()
{
m_name = wxT("ICON resource");
m_extension = wxEmptyString;
m_type = wxBITMAP_TYPE_ICON_RESOURCE;
};
virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
int desiredWidth = -1, int desiredHeight = -1);
};
#endif
// _WX_ICON_H_

View File

@@ -0,0 +1,147 @@
/////////////////////////////////////////////////////////////////////////////
// Name: imaglist.h
// Purpose: wxImageList class. Note: if your GUI doesn't have
// an image list equivalent, you can use the generic class
// in src/generic.
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_IMAGLIST_H_
#define _WX_IMAGLIST_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "imaglist.h"
#endif
#include "wx/bitmap.h"
/*
* wxImageList is used for wxListCtrl, wxTreeCtrl. These controls refer to
* images for their items by an index into an image list.
* A wxImageList is capable of creating images with optional masks from
* a variety of sources - a single bitmap plus a colour to indicate the mask,
* two bitmaps, or an icon.
*
*/
// Flags for Draw
#define wxIMAGELIST_DRAW_NORMAL 0x0001
#define wxIMAGELIST_DRAW_TRANSPARENT 0x0002
#define wxIMAGELIST_DRAW_SELECTED 0x0004
#define wxIMAGELIST_DRAW_FOCUSED 0x0008
// Flag values for Set/GetImageList
enum {
wxIMAGE_LIST_NORMAL, // Normal icons
wxIMAGE_LIST_SMALL, // Small icons
wxIMAGE_LIST_STATE // State icons: unimplemented (see WIN32 documentation)
};
// Eventually we'll make this a reference-counted wxGDIObject. For
// now, the app must take care of ownership issues. That is, the
// image lists must be explicitly deleted after the control(s) that uses them
// is (are) deleted, or when the app exits.
class WXDLLEXPORT wxImageList: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxImageList)
public:
/*
* Public interface
*/
wxImageList();
// Creates an image list.
// Specify the width and height of the images in the list,
// whether there are masks associated with them (e.g. if creating images
// from icons), and the initial size of the list.
inline wxImageList(int width, int height, bool mask = TRUE, int initialCount = 1)
{
Create(width, height, mask, initialCount);
}
~wxImageList();
// Attributes
////////////////////////////////////////////////////////////////////////////
// Returns the number of images in the image list.
int GetImageCount() const;
bool GetSize(int index, int&width, int &height) const;
// Operations
////////////////////////////////////////////////////////////////////////////
// Creates an image list
// width, height specify the size of the images in the list (all the same).
// mask specifies whether the images have masks or not.
// initialNumber is the initial number of images to reserve.
bool Create(int width, int height, bool mask = TRUE, int initialNumber = 1);
// Adds a bitmap, and optionally a mask bitmap.
// Note that wxImageList creates *new* bitmaps, so you may delete
// 'bitmap' and 'mask' after calling Add.
int Add(const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap);
// Adds a bitmap, using the specified colour to create the mask bitmap
// Note that wxImageList creates *new* bitmaps, so you may delete
// 'bitmap' after calling Add.
int Add(const wxBitmap& bitmap, const wxColour& maskColour);
// Adds a bitmap and mask from an icon.
int Add(const wxIcon& icon);
// Replaces a bitmap, optionally passing a mask bitmap.
// Note that wxImageList creates new bitmaps, so you may delete
// 'bitmap' and 'mask' after calling Replace.
bool Replace(int index, const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap);
/* Not supported by Win95
// Replacing a bitmap, using the specified colour to create the mask bitmap
// Note that wxImageList creates new bitmaps, so you may delete
// 'bitmap'.
bool Replace(int index, const wxBitmap& bitmap, const wxColour& maskColour);
*/
// Replaces a bitmap and mask from an icon.
// You can delete 'icon' after calling Replace.
bool Replace(int index, const wxIcon& icon);
// Removes the image at the given index.
bool Remove(int index);
// Remove all images
bool RemoveAll();
// Draws the given image on a dc at the specified position.
// If 'solidBackground' is TRUE, Draw sets the image list background
// colour to the background colour of the wxDC, to speed up
// drawing by eliminating masked drawing where possible.
bool Draw(int index, wxDC& dc, int x, int y,
int flags = wxIMAGELIST_DRAW_NORMAL, bool solidBackground = FALSE);
/* TODO (optional?)
wxIcon *MakeIcon(int index);
*/
/* TODO
// Implementation
////////////////////////////////////////////////////////////////////////////
// Returns the native image list handle
inline WXHIMAGELIST GetHIMAGELIST() const { return m_hImageList; }
protected:
WXHIMAGELIST m_hImageList;
*/
};
#endif
// _WX_IMAGLIST_H_

View File

@@ -0,0 +1,93 @@
/////////////////////////////////////////////////////////////////////////////
// Name: joystick.h
// Purpose: wxJoystick class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_JOYSTICK_H_
#define _WX_JOYSTICK_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "joystick.h"
#endif
#include "wx/event.h"
class WXDLLEXPORT wxJoystick: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxJoystick)
public:
/*
* Public interface
*/
wxJoystick(int joystick = wxJOYSTICK1) { m_joystick = joystick; };
// Attributes
////////////////////////////////////////////////////////////////////////////
wxPoint GetPosition() const;
int GetZPosition() const;
int GetButtonState() const;
int GetPOVPosition() const;
int GetPOVCTSPosition() const;
int GetRudderPosition() const;
int GetUPosition() const;
int GetVPosition() const;
int GetMovementThreshold() const;
void SetMovementThreshold(int threshold) ;
// Capabilities
////////////////////////////////////////////////////////////////////////////
bool IsOk() const; // Checks that the joystick is functioning
int GetNumberJoysticks() const ;
int GetManufacturerId() const ;
int GetProductId() const ;
wxString GetProductName() const ;
int GetXMin() const;
int GetYMin() const;
int GetZMin() const;
int GetXMax() const;
int GetYMax() const;
int GetZMax() const;
int GetNumberButtons() const;
int GetNumberAxes() const;
int GetMaxButtons() const;
int GetMaxAxes() const;
int GetPollingMin() const;
int GetPollingMax() const;
int GetRudderMin() const;
int GetRudderMax() const;
int GetUMin() const;
int GetUMax() const;
int GetVMin() const;
int GetVMax() const;
bool HasRudder() const;
bool HasZ() const;
bool HasU() const;
bool HasV() const;
bool HasPOV() const;
bool HasPOV4Dir() const;
bool HasPOVCTS() const;
// Operations
////////////////////////////////////////////////////////////////////////////
// pollingFreq = 0 means that movement events are sent when above the threshold.
// If pollingFreq > 0, events are received every this many milliseconds.
bool SetCapture(wxWindow* win, int pollingFreq = 0);
bool ReleaseCapture();
protected:
int m_joystick;
};
#endif
// _WX_JOYSTICK_H_

View File

@@ -0,0 +1,182 @@
/////////////////////////////////////////////////////////////////////////////
// Name: listbox.h
// Purpose: wxListBox class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_LISTBOX_H_
#define _WX_LISTBOX_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "listbox.h"
#endif
// ----------------------------------------------------------------------------
// simple types
// ----------------------------------------------------------------------------
#include "wx/dynarray.h"
#include "wx/arrstr.h"
#if wxUSE_OWNER_DRAWN
class WXDLLEXPORT wxOwnerDrawn;
// define the array of list box items
#include "wx/dynarray.h"
WX_DEFINE_EXPORTED_ARRAY(wxOwnerDrawn *, wxListBoxItemsArray);
#endif // wxUSE_OWNER_DRAWN
// forward decl for GetSelections()
class wxArrayInt;
// List box item
WX_DEFINE_ARRAY( char * , wxListDataArray ) ;
// ----------------------------------------------------------------------------
// List box control
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxListBox : public wxListBoxBase
{
public:
// ctors and such
wxListBox();
wxListBox(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr)
{
Create(parent, id, pos, size, n, choices, style, validator, name);
}
wxListBox(wxWindow *parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
const wxArrayString& choices,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr)
{
Create(parent, id, pos, size, choices, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr);
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
const wxArrayString& choices,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr);
virtual ~wxListBox();
virtual void Refresh(bool eraseBack = TRUE, const wxRect *rect = NULL);
// implement base class pure virtuals
virtual void Clear();
virtual void Delete(int n);
virtual int GetCount() const;
virtual wxString GetString(int n) const;
virtual void SetString(int n, const wxString& s);
virtual int FindString(const wxString& s) const;
virtual bool IsSelected(int n) const;
virtual void SetSelection(int n, bool select = TRUE);
virtual int GetSelection() const;
virtual int GetSelections(wxArrayInt& aSelections) const;
virtual int DoAppend(const wxString& item);
virtual void DoInsertItems(const wxArrayString& items, int pos);
virtual void DoSetItems(const wxArrayString& items, void **clientData);
virtual void DoSetFirstItem(int n);
virtual void DoSetItemClientData(int n, void* clientData);
virtual void* DoGetItemClientData(int n) const;
virtual void DoSetItemClientObject(int n, wxClientData* clientData);
virtual wxClientData* DoGetItemClientObject(int n) const;
virtual void DoSetSize(int x, int y,int width, int height,int sizeFlags = wxSIZE_AUTO ) ;
// wxCheckListBox support
#if wxUSE_OWNER_DRAWN
// plug-in for derived classes
virtual wxOwnerDrawn *CreateItem(size_t n);
// allows to get the item and use SetXXX functions to set it's appearance
wxOwnerDrawn *GetItem(size_t n) const { return m_aItems[n]; }
// get the index of the given item
int GetItemIndex(wxOwnerDrawn *item) const { return m_aItems.Index(item); }
#endif // wxUSE_OWNER_DRAWN
// Windows callbacks
virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ;
virtual bool MacCanFocus() const { return true ; }
void OnChar(wxKeyEvent& event);
void* m_macList ;
wxArrayString m_stringArray ;
wxListDataArray m_dataArray ;
wxArrayInt m_selectionPreImage ;
wxArrayLong m_idArray ;
wxUint32 m_nextId ;
void MacSetRedraw( bool doDraw ) ;
protected:
void MacDelete( int n ) ;
void MacInsert( int n , const wxString& item) ;
void MacAppend( const wxString& item) ;
void MacSet( int n , const wxString& item ) ;
void MacClear() ;
void MacSetSelection( int n , bool select ) ;
int MacGetSelection() const ;
int MacGetSelections(wxArrayInt& aSelections) const ;
bool MacIsSelected( int n ) const ;
void MacScrollTo( int n ) ;
void OnSize( wxSizeEvent &size ) ;
void MacDoClick() ;
void MacDoDoubleClick() ;
// do we have multiple selections?
bool HasMultipleSelection() const;
// free memory (common part of Clear() and dtor)
// prevent collision with some BSD definitions of macro Free()
void FreeData();
int m_noItems;
int m_selected;
wxString m_typeIn ;
long m_lastTypeIn ;
virtual wxSize DoGetBestSize() const;
#if wxUSE_OWNER_DRAWN
// control items
wxListBoxItemsArray m_aItems;
#endif
private:
DECLARE_DYNAMIC_CLASS(wxListBox)
DECLARE_EVENT_TABLE()
};
#endif
// _WX_LISTBOX_H_

View File

@@ -0,0 +1,451 @@
/////////////////////////////////////////////////////////////////////////////
// Name: listctrl.h
// Purpose: wxListCtrl class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_LISTCTRL_H_
#define _WX_LISTCTRL_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "listctrl.h"
#endif
#include "wx/control.h"
#include "wx/event.h"
#include "wx/imaglist.h"
/*
The wxListCtrl can show lists of items in four different modes:
wxLC_LIST: multicolumn list view, with optional small icons (icons could be
optional for some platforms). Columns are computed automatically,
i.e. you don't set columns as in wxLC_REPORT. In other words,
the list wraps, unlike a wxListBox.
wxLC_REPORT: single or multicolumn report view (with optional header)
wxLC_ICON: large icon view, with optional labels
wxLC_SMALL_ICON: small icon view, with optional labels
You can change the style dynamically, either with SetSingleStyle or
SetWindowStyleFlag.
Further window styles:
wxLC_ALIGN_TOP icons align to the top (default)
wxLC_ALIGN_LEFT icons align to the left
wxLC_AUTOARRANGE icons arrange themselves
wxLC_USER_TEXT the app provides label text on demand, except for column headers
wxLC_EDIT_LABELS labels are editable: app will be notified.
wxLC_NO_HEADER no header in report mode
wxLC_NO_SORT_HEADER can't click on header
wxLC_SINGLE_SEL single selection
wxLC_SORT_ASCENDING sort ascending (must still supply a comparison callback in SortItems)
wxLC_SORT_DESCENDING sort descending (ditto)
Items are referred to by their index (position in the list starting from zero).
Label text is supplied via insertion/setting functions and is stored by the
control, unless the wxLC_USER_TEXT style has been specified, in which case
the app will be notified when text is required (see sample).
Images are dealt with by (optionally) associating 3 image lists with the control.
Zero-based indexes into these image lists indicate which image is to be used for
which item. Each image in an image list can contain a mask, and can be made out
of either a bitmap, two bitmaps or an icon. See ImagList.h for more details.
Notifications are passed via the wxWindows 2.0 event system.
See the sample wxListCtrl app for API usage.
*/
// Mask flags to tell app/GUI what fields of wxListItem are valid
#define wxLIST_MASK_STATE 0x0001
#define wxLIST_MASK_TEXT 0x0002
#define wxLIST_MASK_IMAGE 0x0004
#define wxLIST_MASK_DATA 0x0008
#define wxLIST_SET_ITEM 0x0010
#define wxLIST_MASK_WIDTH 0x0020
#define wxLIST_MASK_FORMAT 0x0040
// State flags for indicating the state of an item
#define wxLIST_STATE_DONTCARE 0x0000
#define wxLIST_STATE_DROPHILITED 0x0001
#define wxLIST_STATE_FOCUSED 0x0002
#define wxLIST_STATE_SELECTED 0x0004
#define wxLIST_STATE_CUT 0x0008
// Hit test flags, used in HitTest
#define wxLIST_HITTEST_ABOVE 0x0001 // Above the client area.
#define wxLIST_HITTEST_BELOW 0x0002 // Below the client area.
#define wxLIST_HITTEST_NOWHERE 0x0004 // In the client area but below the last item.
#define wxLIST_HITTEST_ONITEMICON 0x0020 // On the bitmap associated with an item.
#define wxLIST_HITTEST_ONITEMLABEL 0x0080 // On the label (string) associated with an item.
#define wxLIST_HITTEST_ONITEMRIGHT 0x0100 // In the area to the right of an item.
#define wxLIST_HITTEST_ONITEMSTATEICON 0x0200 // On the state icon for a tree view item that is in a user-defined state.
#define wxLIST_HITTEST_TOLEFT 0x0400 // To the left of the client area.
#define wxLIST_HITTEST_TORIGHT 0x0800 // To the right of the client area.
#define wxLIST_HITTEST_ONITEM (wxLIST_HITTEST_ONITEMICON | wxLIST_HITTEST_ONITEMLABEL wxLIST_HITTEST_ONITEMSTATEICON)
// Flags for GetNextItem
enum {
wxLIST_NEXT_ABOVE, // Searches for an item above the specified item
wxLIST_NEXT_ALL, // Searches for subsequent item by index
wxLIST_NEXT_BELOW, // Searches for an item below the specified item
wxLIST_NEXT_LEFT, // Searches for an item to the left of the specified item
wxLIST_NEXT_RIGHT, // Searches for an item to the right of the specified item
};
// Alignment flags for Arrange
enum {
wxLIST_ALIGN_DEFAULT,
wxLIST_ALIGN_LEFT,
wxLIST_ALIGN_TOP,
wxLIST_ALIGN_SNAP_TO_GRID
};
// Column format
enum {
wxLIST_FORMAT_LEFT,
wxLIST_FORMAT_RIGHT,
wxLIST_FORMAT_CENTRE,
wxLIST_FORMAT_CENTER = wxLIST_FORMAT_CENTRE
};
// Autosize values for SetColumnWidth
enum {
wxLIST_AUTOSIZE = -1,
wxLIST_AUTOSIZE_USEHEADER = -2
};
// Flag values for GetItemRect
enum {
wxLIST_RECT_BOUNDS,
wxLIST_RECT_ICON,
wxLIST_RECT_LABEL
};
// Flag values for FindItem
enum {
wxLIST_FIND_UP,
wxLIST_FIND_DOWN,
wxLIST_FIND_LEFT,
wxLIST_FIND_RIGHT
};
// wxListItem: data representing an item, or report field.
// It also doubles up to represent entire column information
// when inserting or setting a column.
class WXDLLEXPORT wxListItem: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxListItem)
public:
long m_mask; // Indicates what fields are valid
long m_itemId; // The zero-based item position
int m_col; // Zero-based column, if in report mode
long m_state; // The state of the item
long m_stateMask; // Which flags of m_state are valid (uses same flags)
wxString m_text; // The label/header text
int m_image; // The zero-based index into an image list
long m_data; // App-defined data
// For columns only
int m_format; // left, right, centre
int m_width; // width of column
wxListItem();
};
// type of compare function for wxListCtrl sort operation
typedef int (*wxListCtrlCompare)(long item1, long item2, long sortData);
class WXDLLEXPORT wxListCtrl: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxListCtrl)
public:
/*
* Public interface
*/
wxListCtrl();
inline wxListCtrl(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator,
const wxString& name = "listCtrl")
{
Create(parent, id, pos, size, style, validator, name);
}
~wxListCtrl();
bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxListCtrl");
// Attributes
////////////////////////////////////////////////////////////////////////////
// Gets information about this column
bool GetColumn(int col, wxListItem& item) const;
// Sets information about this column
bool SetColumn(int col, wxListItem& item) ;
// Gets the column width
int GetColumnWidth(int col) const;
// Sets the column width
bool SetColumnWidth(int col, int width) ;
// Gets the number of items that can fit vertically in the
// visible area of the list control (list or report view)
// or the total number of items in the list control (icon
// or small icon view)
int GetCountPerPage() const;
// Gets the edit control for editing labels.
wxTextCtrl* GetEditControl() const;
// Gets information about the item
bool GetItem(wxListItem& info) const ;
// Sets information about the item
bool SetItem(wxListItem& info) ;
// Sets a string field at a particular column
long SetItem(long index, int col, const wxString& label, int imageId = -1);
// Gets the item state
int GetItemState(long item, long stateMask) const ;
// Sets the item state
bool SetItemState(long item, long state, long stateMask) ;
// Sets the item image
bool SetItemImage(long item, int image, int selImage) ;
// Gets the item text
wxString GetItemText(long item) const ;
// Sets the item text
void SetItemText(long item, const wxString& str) ;
// Gets the item data
long GetItemData(long item) const ;
// Sets the item data
bool SetItemData(long item, long data) ;
// Gets the item rectangle
bool GetItemRect(long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS) const ;
// Gets the item position
bool GetItemPosition(long item, wxPoint& pos) const ;
// Sets the item position
bool SetItemPosition(long item, const wxPoint& pos) ;
// Gets the number of items in the list control
int GetItemCount() const;
// Gets the number of columns in the list control
int GetColumnCount() const;
// Retrieves the spacing between icons in pixels.
// If small is TRUE, gets the spacing for the small icon
// view, otherwise the large icon view.
int GetItemSpacing(bool isSmall) const;
// Gets the number of selected items in the list control
int GetSelectedItemCount() const;
// Gets the text colour of the listview
wxColour GetTextColour() const;
// Sets the text colour of the listview
void SetTextColour(const wxColour& col);
// Gets the index of the topmost visible item when in
// list or report view
long GetTopItem() const ;
// Add or remove a single window style
void SetSingleStyle(long style, bool add = TRUE) ;
// Set the whole window style
void SetWindowStyleFlag(long style) ;
// Searches for an item, starting from 'item'.
// item can be -1 to find the first item that matches the
// specified flags.
// Returns the item or -1 if unsuccessful.
long GetNextItem(long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE) const ;
// Implementation: converts wxWindows style to MSW style.
// Can be a single style flag or a bit list.
// oldStyle is 'normalised' so that it doesn't contain
// conflicting styles.
long ConvertToMSWStyle(long& oldStyle, long style) const;
// Gets one of the three image lists
wxImageList *GetImageList(int which) const ;
// Sets the image list
// N.B. There's a quirk in the Win95 list view implementation.
// If in wxLC_LIST mode, it'll *still* display images by the labels if
// there's a small-icon image list set for the control - even though you
// haven't specified wxLIST_MASK_IMAGE when inserting.
// So you have to set a NULL small-icon image list to be sure that
// the wxLC_LIST mode works without icons. Of course, you may want icons...
void SetImageList(wxImageList *imageList, int which) ;
// Operations
////////////////////////////////////////////////////////////////////////////
// Arranges the items
bool Arrange(int flag = wxLIST_ALIGN_DEFAULT);
// Deletes an item
bool DeleteItem(long item);
// Deletes all items
bool DeleteAllItems() ;
// Deletes a column
bool DeleteColumn(int col);
// Deletes all columns
bool DeleteAllColumns();
// Clears items, and columns if there are any.
void ClearAll();
// Edit the label
wxTextCtrl* EditLabel(long item, wxClassInfo* textControlClass = CLASSINFO(wxTextCtrl));
// End label editing, optionally cancelling the edit
bool EndEditLabel(bool cancel);
// Ensures this item is visible
bool EnsureVisible(long item) ;
// Find an item whose label matches this string, starting from the item after 'start'
// or the beginning if 'start' is -1.
long FindItem(long start, const wxString& str, bool partial = FALSE);
// Find an item whose data matches this data, starting from the item after 'start'
// or the beginning if 'start' is -1.
long FindItem(long start, long data);
// Find an item nearest this position in the specified direction, starting from
// the item after 'start' or the beginning if 'start' is -1.
long FindItem(long start, const wxPoint& pt, int direction);
// Determines which item (if any) is at the specified point,
// giving details in 'flags' (see wxLIST_HITTEST_... flags above)
long HitTest(const wxPoint& point, int& flags);
// Inserts an item, returning the index of the new item if successful,
// -1 otherwise.
// TOD: Should also have some further convenience functions
// which don't require setting a wxListItem object
long InsertItem(wxListItem& info);
// Insert a string item
long InsertItem(long index, const wxString& label);
// Insert an image item
long InsertItem(long index, int imageIndex);
// Insert an image/string item
long InsertItem(long index, const wxString& label, int imageIndex);
// For list view mode (only), inserts a column.
long InsertColumn(long col, wxListItem& info);
long InsertColumn(long col, const wxString& heading, int format = wxLIST_FORMAT_LEFT,
int width = -1);
// Scrolls the list control. If in icon, small icon or report view mode,
// x specifies the number of pixels to scroll. If in list view mode, x
// specifies the number of columns to scroll.
// If in icon, small icon or list view mode, y specifies the number of pixels
// to scroll. If in report view mode, y specifies the number of lines to scroll.
bool ScrollList(int dx, int dy);
// Sort items.
// fn is a function which takes 3 long arguments: item1, item2, data.
// item1 is the long data associated with a first item (NOT the index).
// item2 is the long data associated with a second item (NOT the index).
// data is the same value as passed to SortItems.
// The return value is a negative number if the first item should precede the second
// item, a positive number of the second item should precede the first,
// or zero if the two items are equivalent.
// data is arbitrary data to be passed to the sort function.
bool SortItems(wxListCtrlCompare fn, long data);
/* Why should we need this function? Leave for now.
* We might need it because item data may have changed,
* but the display needs refreshing (in string callback mode)
// Updates an item. If the list control has the wxLI_AUTO_ARRANGE style,
// the items will be rearranged.
bool Update(long item);
*/
void Command(wxCommandEvent& event) { ProcessCommand(event); };
protected:
wxTextCtrl* m_textCtrl; // The control used for editing a label
wxImageList * m_imageListNormal; // The image list for normal icons
wxImageList * m_imageListSmall; // The image list for small icons
wxImageList * m_imageListState; // The image list state icons (not implemented yet)
long m_baseStyle; // Basic Windows style flags, for recreation purposes
wxStringList m_stringPool; // Pool of 3 strings to satisfy Windows callback
// requirements
int m_colCount; // Windows doesn't have GetColumnCount so must
// keep track of inserted/deleted columns
};
class WXDLLEXPORT wxListEvent: public wxCommandEvent
{
DECLARE_DYNAMIC_CLASS(wxListEvent)
public:
wxListEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
int m_code;
long m_itemIndex;
long m_oldItemIndex;
int m_col;
bool m_cancelled;
wxPoint m_pointDrag;
wxListItem m_item;
};
typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&);
#define EVT_LIST_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
#define EVT_LIST_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
#define EVT_LIST_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
#define EVT_LIST_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
#define EVT_LIST_DELETE_ITEM(id, fn) { wxEVT_COMMAND_LIST_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
#define EVT_LIST_DELETE_ALL_ITEMS(id, fn) { wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
#define EVT_LIST_GET_INFO(id, fn) { wxEVT_COMMAND_LIST_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
#define EVT_LIST_SET_INFO(id, fn) { wxEVT_COMMAND_LIST_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
#define EVT_LIST_ITEM_SELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
#define EVT_LIST_ITEM_DESELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_DESELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
#define EVT_LIST_KEY_DOWN(id, fn) { wxEVT_COMMAND_LIST_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
#define EVT_LIST_INSERT_ITEM(id, fn) { wxEVT_COMMAND_LIST_INSERT_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
#define EVT_LIST_COL_CLICK(id, fn) { wxEVT_COMMAND_LIST_COL_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
#endif
// _WX_LISTCTRL_H_

View File

@@ -0,0 +1,33 @@
/* -------------------------------------------------------------------------
* Project: Mac Notifier Support
* Name: macnotfy.h
* Author: Stefan CSomor
* Purpose: Mac Notifier include file
* CVSID: $Id$
* -------------------------------------------------------------------------
*/
#ifndef MAC_NOTIFYERS
#define MAC_NOTIFYERS
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef void (*wxMacNotificationProcPtr)(unsigned long event , void* data ) ;
typedef void *wxMacNotifierTableRef ;
void wxMacCreateNotifierTable() ;
void wxMacDestroyNotifierTable() ;
wxMacNotifierTableRef wxMacGetNotifierTable() ;
void wxMacAddEvent( wxMacNotifierTableRef table , wxMacNotificationProcPtr handler , unsigned long event , void* data , short wakeUp ) ;
void wxMacWakeUp() ;
void wxMacProcessNotifierEvents() ;
void wxMacProcessNotifierAndPendingEvents() ;
void wxMacRemoveAllNotifiersForData( wxMacNotifierTableRef table , void* data ) ;
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* MAC_NOTIFYERS */

View File

180
include/wx/mac/carbon/mdi.h Normal file
View File

@@ -0,0 +1,180 @@
/////////////////////////////////////////////////////////////////////////////
// Name: mdi.h
// Purpose: MDI (Multiple Document Interface) classes.
// This doesn't have to be implemented just like Windows,
// it could be a tabbed design as in wxGTK.
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MDI_H_
#define _WX_MDI_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "mdi.h"
#endif
#include "wx/frame.h"
WXDLLEXPORT_DATA(extern const wxChar*) wxFrameNameStr;
WXDLLEXPORT_DATA(extern const wxChar*) wxStatusLineNameStr;
class WXDLLEXPORT wxMDIClientWindow;
class WXDLLEXPORT wxMDIChildFrame;
class WXDLLEXPORT wxMDIParentFrame: public wxFrame
{
DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
public:
wxMDIParentFrame();
inline wxMDIParentFrame(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, // Scrolling refers to client window
const wxString& name = wxFrameNameStr)
{
Create(parent, id, title, pos, size, style, name);
}
~wxMDIParentFrame();
bool Create(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
const wxString& name = wxFrameNameStr);
// Mac OS activate event
virtual void MacActivate(long timestamp, bool activating);
// wxWindows activate event
void OnActivate(wxActivateEvent& event);
void OnSysColourChanged(wxSysColourChangedEvent& event);
void SetMenuBar(wxMenuBar *menu_bar);
// Get the active MDI child window (Windows only)
wxMDIChildFrame *GetActiveChild() const ;
// Get the client window
inline wxMDIClientWindow *GetClientWindow() const { return m_clientWindow; };
// Create the client window class (don't Create the window,
// just return a new class)
virtual wxMDIClientWindow *OnCreateClient() ;
// MDI operations
virtual void Cascade();
virtual void Tile();
virtual void ArrangeIcons();
virtual void ActivateNext();
virtual void ActivatePrevious();
protected:
// TODO maybe have this member
wxMDIClientWindow *m_clientWindow;
wxMDIChildFrame * m_currentChild;
wxMenu* m_windowMenu;
// TRUE if MDI Frame is intercepting commands, not child
bool m_parentFrameActive;
private:
friend class WXDLLEXPORT wxMDIChildFrame;
DECLARE_EVENT_TABLE()
};
class WXDLLEXPORT wxMDIChildFrame: public wxFrame
{
DECLARE_DYNAMIC_CLASS(wxMDIChildFrame)
public:
wxMDIChildFrame();
inline wxMDIChildFrame(wxMDIParentFrame *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr)
{
Init() ;
Create(parent, id, title, pos, size, style, name);
}
~wxMDIChildFrame();
bool Create(wxMDIParentFrame *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr);
// Mac OS activate event
virtual void MacActivate(long timestamp, bool activating);
// Set menu bar
void SetMenuBar(wxMenuBar *menu_bar);
// MDI operations
virtual void Maximize();
virtual void Maximize( bool ){ Maximize() ; } // this one is inherited from wxFrame
virtual void Restore();
virtual void Activate();
protected:
// common part of all ctors
void Init();
};
/* The client window is a child of the parent MDI frame, and itself
* contains the child MDI frames.
* However, you create the MDI children as children of the MDI parent:
* only in the implementation does the client window become the parent
* of the children. Phew! So the children are sort of 'adopted'...
*/
class WXDLLEXPORT wxMDIClientWindow: public wxWindow
{
DECLARE_DYNAMIC_CLASS(wxMDIClientWindow)
public:
wxMDIClientWindow() ;
inline wxMDIClientWindow(wxMDIParentFrame *parent, long style = 0)
{
CreateClient(parent, style);
}
~wxMDIClientWindow();
// Note: this is virtual, to allow overridden behaviour.
virtual bool CreateClient(wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL);
// Gets the size available for subwindows after menu size, toolbar size
// and status bar size have been subtracted. If you want to manage your own
// toolbar(s), don't call SetToolBar.
void DoGetClientSize(int *width, int *height) const;
// Explicitly call default scroll behaviour
void OnScroll(wxScrollEvent& event);
protected:
DECLARE_EVENT_TABLE()
};
#endif
// _WX_MDI_H_

View File

@@ -0,0 +1,169 @@
/////////////////////////////////////////////////////////////////////////////
// Name: menu.h
// Purpose: wxMenu, wxMenuBar classes
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MENU_H_
#define _WX_MENU_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "menu.h"
#endif
class WXDLLEXPORT wxFrame;
#include "wx/arrstr.h"
// ----------------------------------------------------------------------------
// Menu
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxMenu : public wxMenuBase
{
public:
// ctors & dtor
wxMenu(const wxString& title, long style = 0)
: wxMenuBase(title, style) { Init(); }
wxMenu(long style = 0) : wxMenuBase(style) { Init(); }
virtual ~wxMenu();
// implement base class virtuals
virtual wxMenuItem* DoAppend(wxMenuItem *item);
virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item);
virtual wxMenuItem* DoRemove(wxMenuItem *item);
virtual void Attach(wxMenuBarBase *menubar) ;
virtual void Break();
virtual void SetTitle(const wxString& title);
// MSW-specific
bool ProcessCommand(wxCommandEvent& event);
// implementation only from now on
// -------------------------------
int MacGetIndexFromId( int id ) ;
int MacGetIndexFromItem( wxMenuItem *pItem ) ;
void MacEnableMenu( bool bDoEnable ) ;
// MacOS needs to know about submenus somewhere within this menu
// before it can be displayed , also hide special menu items like preferences
// that are handled by the OS
void MacBeforeDisplay( bool isSubMenu ) ;
// undo all changes from the MacBeforeDisplay call
void MacAfterDisplay( bool isSubMenu ) ;
// semi-private accessors
// get the window which contains this menu
wxWindow *GetWindow() const;
// get the menu handle
WXHMENU GetHMenu() const { return m_hMenu; }
short MacGetMenuId() { return m_macMenuId ; }
private:
// common part of all ctors
void Init();
// common part of Append/Insert (behaves as Append is pos == (size_t)-1)
bool DoInsertOrAppend(wxMenuItem *item, size_t pos = (size_t)-1);
// terminate the current radio group, if any
void EndRadioGroup();
// if TRUE, insert a breal before appending the next item
bool m_doBreak;
// the position of the first item in the current radio group or -1
int m_startRadioGroup;
// the menu handle of this menu
WXHMENU m_hMenu;
short m_macMenuId;
static short s_macNextMenuId ;
DECLARE_DYNAMIC_CLASS(wxMenu)
};
// ----------------------------------------------------------------------------
// Menu Bar (a la Windows)
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxMenuBar : public wxMenuBarBase
{
public:
// ctors & dtor
// default constructor
wxMenuBar();
// unused under MSW
wxMenuBar(long style);
// menubar takes ownership of the menus arrays but copies the titles
wxMenuBar(int n, wxMenu *menus[], const wxString titles[]);
virtual ~wxMenuBar();
// menubar construction
virtual bool Append( wxMenu *menu, const wxString &title );
virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title);
virtual wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title);
virtual wxMenu *Remove(size_t pos);
virtual int FindMenuItem(const wxString& menuString,
const wxString& itemString) const;
virtual wxMenuItem* FindItem( int id, wxMenu **menu = NULL ) const;
virtual void EnableTop( size_t pos, bool flag );
virtual void SetLabelTop( size_t pos, const wxString& label );
virtual wxString GetLabelTop( size_t pos ) const;
// implementation from now on
WXHMENU Create();
int FindMenu(const wxString& title);
void Detach();
// returns TRUE if we're attached to a frame
bool IsAttached() const { return m_menuBarFrame != NULL; }
// get the frame we live in
wxFrame *GetFrame() const { return m_menuBarFrame; }
// attach to a frame
void Attach(wxFrame *frame);
// clear the invoking window for all menus and submenus
void UnsetInvokingWindow() ;
// set the invoking window for all menus and submenus
void SetInvokingWindow( wxFrame* frame ) ;
// if the menubar is modified, the display is not updated automatically,
// call this function to update it (m_menuBarFrame should be !NULL)
void Refresh(bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL);
void MacInstallMenuBar() ;
static wxMenuBar* MacGetInstalledMenuBar() { return s_macInstalledMenuBar ; }
static void MacSetCommonMenuBar(wxMenuBar* menubar) { s_macCommonMenuBar=menubar; }
static wxMenuBar* MacGetCommonMenuBar() { return s_macCommonMenuBar; }
protected:
// common part of all ctors
void Init();
wxWindow *m_invokingWindow;
wxArrayString m_titles;
private:
static wxMenuBar* s_macInstalledMenuBar ;
static wxMenuBar* s_macCommonMenuBar ;
DECLARE_DYNAMIC_CLASS(wxMenuBar)
};
#endif // _WX_MENU_H_

View File

@@ -0,0 +1,81 @@
///////////////////////////////////////////////////////////////////////////////
// Name: menuitem.h
// Purpose: wxMenuItem class
// Author: Vadim Zeitlin
// Modified by:
// Created: 11.11.97
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _MENUITEM_H
#define _MENUITEM_H
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "menuitem.h"
#endif
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#include "wx/setup.h"
// ----------------------------------------------------------------------------
// wxMenuItem: an item in the menu, optionally implements owner-drawn behaviour
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxMenuItem: public wxMenuItemBase
{
public:
// ctor & dtor
wxMenuItem(wxMenu *parentMenu = (wxMenu *)NULL,
int id = wxID_SEPARATOR,
const wxString& name = wxEmptyString,
const wxString& help = wxEmptyString,
wxItemKind kind = wxITEM_NORMAL,
wxMenu *subMenu = (wxMenu *)NULL);
virtual ~wxMenuItem();
// override base class virtuals
virtual void SetText(const wxString& strName);
virtual void Enable(bool bDoEnable = TRUE);
virtual void Check(bool bDoCheck = TRUE);
virtual void SetBitmap(const wxBitmap& bitmap) ;
virtual const wxBitmap& GetBitmap() const { return m_bitmap; }
// update the os specific representation
void UpdateItemBitmap() ;
void UpdateItemText() ;
void UpdateItemStatus() ;
// mark item as belonging to the given radio group
void SetAsRadioGroupStart();
void SetRadioGroupStart(int start);
void SetRadioGroupEnd(int end);
private:
void UncheckRadio() ;
// the positions of the first and last items of the radio group this item
// belongs to or -1: start is the radio group start and is valid for all
// but first radio group items (m_isRadioGroupStart == FALSE), end is valid
// only for the first one
union
{
int start;
int end;
} m_radioGroup;
// does this item start a radio group?
bool m_isRadioGroupStart;
wxBitmap m_bitmap; // Bitmap for menuitem, if any
void* m_menu ; // the appropriate menu , may also be a system menu
DECLARE_DYNAMIC_CLASS(wxMenuItem)
};
#endif //_MENUITEM_H

View File

@@ -0,0 +1,166 @@
/////////////////////////////////////////////////////////////////////////////
// Name: metafile.h
// Purpose: wxMetaFile, wxMetaFileDC classes.
// This probably should be restricted to Windows platforms,
// but if there is an equivalent on your platform, great.
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_METAFIILE_H_
#define _WX_METAFIILE_H_
#if wxUSE_METAFILE
#include "wx/dc.h"
#include "wx/gdiobj.h"
#if wxUSE_DATAOBJ
#include "wx/dataobj.h"
#endif
/*
* Metafile and metafile device context classes
*
*/
#define wxMetaFile wxMetafile
#define wxMetaFileDC wxMetafileDC
class WXDLLEXPORT wxMetafile;
class WXDLLEXPORT wxMetafileRefData: public wxGDIRefData
{
friend class WXDLLEXPORT wxMetafile;
public:
wxMetafileRefData(void);
~wxMetafileRefData(void);
public:
WXHMETAFILE m_metafile;
};
#define M_METAFILEDATA ((wxMetafileRefData *)m_refData)
class WXDLLEXPORT wxMetafile: public wxGDIObject
{
DECLARE_DYNAMIC_CLASS(wxMetafile)
public:
// Copy constructor
wxMetafile(const wxMetafile& metafile)
: wxGDIObject()
{ Ref(metafile); }
wxMetafile(const wxString& file = wxEmptyString);
~wxMetafile(void);
// After this is called, the metafile cannot be used for anything
// since it is now owned by the clipboard.
virtual bool SetClipboard(int width = 0, int height = 0);
virtual bool Play(wxDC *dc);
inline bool Ok(void) const { return (M_METAFILEDATA && (M_METAFILEDATA->m_metafile != 0)); };
wxSize GetSize() const;
int GetWidth() const { return GetSize().x; }
int GetHeight() const { return GetSize().y; }
// Implementation
inline WXHMETAFILE GetHMETAFILE() const { return M_METAFILEDATA->m_metafile; }
void SetHMETAFILE(WXHMETAFILE mf) ;
// Operators
inline wxMetafile& operator = (const wxMetafile& metafile) { if (*this == metafile) return (*this); Ref(metafile); return *this; }
inline bool operator == (const wxMetafile& metafile) { return m_refData == metafile.m_refData; }
inline bool operator != (const wxMetafile& metafile) { return m_refData != metafile.m_refData; }
protected:
};
class WXDLLEXPORT wxMetafileDC: public wxDC
{
DECLARE_DYNAMIC_CLASS(wxMetafileDC)
public:
// the ctor parameters specify the filename (empty for memory metafiles),
// the metafile picture size and the optional description/comment
wxMetafileDC(const wxString& filename = wxEmptyString,
int width = 0, int height = 0,
const wxString& description = wxEmptyString);
~wxMetafileDC(void);
// Should be called at end of drawing
virtual wxMetafile *Close(void);
virtual void DoGetSize(int *width, int *height) const ;
// Implementation
inline wxMetafile *GetMetaFile(void) const { return m_metaFile; }
inline void SetMetaFile(wxMetafile *mf) { m_metaFile = mf; }
protected:
wxMetafile* m_metaFile;
};
/*
* Pass filename of existing non-placeable metafile, and bounding box.
* Adds a placeable metafile header, sets the mapping mode to anisotropic,
* and sets the window origin and extent to mimic the wxMM_TEXT mapping mode.
*
*/
// No origin or extent
#define wxMakeMetaFilePlaceable wxMakeMetafilePlaceable
bool WXDLLEXPORT wxMakeMetafilePlaceable(const wxString& filename, float scale = 1.0);
// Optional origin and extent
bool WXDLLEXPORT wxMakeMetaFilePlaceable(const wxString& filename, int x1, int y1, int x2, int y2, float scale = 1.0, bool useOriginAndExtent = TRUE);
// ----------------------------------------------------------------------------
// wxMetafileDataObject is a specialization of wxDataObject for metafile data
// ----------------------------------------------------------------------------
#if wxUSE_DATAOBJ
class WXDLLEXPORT wxMetafileDataObject : public wxDataObjectSimple
{
public:
// ctors
wxMetafileDataObject()
: wxDataObjectSimple(wxDF_METAFILE) { };
wxMetafileDataObject(const wxMetafile& metafile)
: wxDataObjectSimple(wxDF_METAFILE), m_metafile(metafile) { }
// virtual functions which you may override if you want to provide data on
// demand only - otherwise, the trivial default versions will be used
virtual void SetMetafile(const wxMetafile& metafile)
{ m_metafile = metafile; }
virtual wxMetafile GetMetafile() const
{ return m_metafile; }
// implement base class pure virtuals
virtual size_t GetDataSize() const;
virtual bool GetDataHere(void *buf) const;
virtual bool SetData(size_t len, const void *buf);
virtual size_t GetDataSize(const wxDataFormat& WXUNUSED(format)) const
{ return GetDataSize(); }
virtual bool GetDataHere(const wxDataFormat& WXUNUSED(format),
void *buf) const
{ return GetDataHere(buf); }
virtual bool SetData(const wxDataFormat& WXUNUSED(format),
size_t len, const void *buf)
{ return SetData(len, buf); }
protected:
wxMetafile m_metafile;
};
#endif
#endif // wxUSE_METAFILE
#endif
// _WX_METAFIILE_H_

View File

@@ -0,0 +1,122 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/mac/mimetype.h
// Purpose: classes and functions to manage MIME types
// Author: Vadim Zeitlin
// Modified by:
// Created: 23.09.98
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence (part of wxExtra library)
/////////////////////////////////////////////////////////////////////////////
#ifndef _MIMETYPE_IMPL_H
#define _MIMETYPE_IMPL_H
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "mimetype.h"
#endif
#include "wx/defs.h"
#include "wx/mimetype.h"
class wxMimeTypesManagerImpl
{
public :
wxMimeTypesManagerImpl() { }
#ifdef __DARWIN__
~wxMimeTypesManagerImpl() { }
#endif
// load all data into memory - done when it is needed for the first time
void Initialize(int mailcapStyles = wxMAILCAP_STANDARD,
const wxString& extraDir = wxEmptyString);
// and delete the data here
void ClearData();
// implement containing class functions
wxFileType *GetFileTypeFromExtension(const wxString& ext);
wxFileType *GetOrAllocateFileTypeFromExtension(const wxString& ext) ;
wxFileType *GetFileTypeFromMimeType(const wxString& mimeType);
size_t EnumAllFileTypes(wxArrayString& mimetypes);
// this are NOPs under MacOS
bool ReadMailcap(const wxString& WXUNUSED(filename), bool WXUNUSED(fallback) = TRUE) { return TRUE; }
bool ReadMimeTypes(const wxString& WXUNUSED(filename)) { return TRUE; }
void AddFallback(const wxFileTypeInfo& ft) { m_fallbacks.Add(ft); }
// create a new filetype association
wxFileType *Associate(const wxFileTypeInfo& ftInfo);
// remove association
bool Unassociate(wxFileType *ft);
// create a new filetype with the given name and extension
wxFileType *CreateFileType(const wxString& filetype, const wxString& ext);
private:
wxArrayFileTypeInfo m_fallbacks;
};
class wxFileTypeImpl
{
public:
// initialization functions
// this is used to construct a list of mimetypes which match;
// if built with GetFileTypeFromMimetype index 0 has the exact match and
// index 1 the type / * match
// if built with GetFileTypeFromExtension, index 0 has the mimetype for
// the first extension found, index 1 for the second and so on
void Init(wxMimeTypesManagerImpl *manager, size_t index)
{ m_manager = manager; m_index.Add(index); }
// initialize us with our file type name
void SetFileType(const wxString& strFileType)
{ m_strFileType = strFileType; }
void SetExt(const wxString& ext)
{ m_ext = ext; }
// implement accessor functions
bool GetExtensions(wxArrayString& extensions);
bool GetMimeType(wxString *mimeType) const;
bool GetMimeTypes(wxArrayString& mimeTypes) const;
bool GetIcon(wxIconLocation *iconLoc) const;
bool GetDescription(wxString *desc) const;
bool GetOpenCommand(wxString *openCmd,
const wxFileType::MessageParameters&) const
{ return GetCommand(openCmd, "open"); }
bool GetPrintCommand(wxString *printCmd,
const wxFileType::MessageParameters&) const
{ return GetCommand(printCmd, "print"); }
size_t GetAllCommands(wxArrayString * verbs, wxArrayString * commands,
const wxFileType::MessageParameters& params) const;
// remove the record for this file type
// probably a mistake to come here, use wxMimeTypesManager.Unassociate (ft) instead
bool Unassociate(wxFileType *ft)
{
return m_manager->Unassociate(ft);
}
// set an arbitrary command, ask confirmation if it already exists and
// overwriteprompt is TRUE
bool SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt = TRUE);
bool SetDefaultIcon(const wxString& strIcon = wxEmptyString, int index = 0);
private:
// helper function
bool GetCommand(wxString *command, const char *verb) const;
wxMimeTypesManagerImpl *m_manager;
wxArrayInt m_index; // in the wxMimeTypesManagerImpl arrays
wxString m_strFileType, m_ext;
};
#endif
//_MIMETYPE_H
/* vi: set cin tw=80 ts=4 sw=4: */

View File

@@ -0,0 +1,46 @@
/////////////////////////////////////////////////////////////////////////////
// Name: minifram.h
// Purpose: wxMiniFrame class. A small frame for e.g. floating toolbars.
// If there is no equivalent on your platform, just make it a
// normal frame.
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MINIFRAM_H_
#define _WX_MINIFRAM_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "minifram.h"
#endif
#include "wx/frame.h"
class WXDLLEXPORT wxMiniFrame: public wxFrame {
DECLARE_DYNAMIC_CLASS(wxMiniFrame)
public:
inline wxMiniFrame() {}
inline wxMiniFrame(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE|wxTINY_CAPTION_HORIZ,
const wxString& name = wxFrameNameStr)
{
// Use wxFrame constructor in absence of more specific code.
Create(parent, id, title, pos, size, style | wxFRAME_TOOL_WINDOW | wxFRAME_FLOAT_ON_PARENT , name);
}
~wxMiniFrame() {}
protected:
};
#endif
// _WX_MINIFRAM_H_

View File

@@ -0,0 +1,55 @@
/////////////////////////////////////////////////////////////////////////////
// Name: msgdlg.h
// Purpose: wxMessageDialog class. Use generic version if no
// platform-specific implementation.
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSGBOXDLG_H_
#define _WX_MSGBOXDLG_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "msgdlg.h"
#endif
#include "wx/setup.h"
#include "wx/dialog.h"
/*
* Message box dialog
*/
WXDLLEXPORT_DATA(extern const wxChar*) wxMessageBoxCaptionStr;
class WXDLLEXPORT wxMessageDialog: public wxDialog
{
DECLARE_DYNAMIC_CLASS(wxMessageDialog)
protected:
wxString m_caption;
wxString m_message;
long m_dialogStyle;
wxWindow * m_parent;
public:
wxMessageDialog(wxWindow *parent,
const wxString& message,
const wxString& caption = wxMessageBoxCaptionStr,
long style = wxOK|wxCENTRE,
const wxPoint& pos = wxDefaultPosition);
int ShowModal();
// not supported for message dialog, RR
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
int WXUNUSED(width), int WXUNUSED(height),
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
};
#endif
// _WX_MSGBOXDLG_H_

View File

@@ -0,0 +1,157 @@
/////////////////////////////////////////////////////////////////////////////
// Name: notebook.h
// Purpose: MSW/GTK compatible notebook (a.k.a. property sheet)
// Author: Stefan Csomor
// Modified by:
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_NOTEBOOK_H_
#define _WX_NOTEBOOK_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "notebook.h"
#endif
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#include "wx/event.h"
// ----------------------------------------------------------------------------
// types
// ----------------------------------------------------------------------------
// fwd declarations
class WXDLLEXPORT wxImageList;
class WXDLLEXPORT wxWindow;
// ----------------------------------------------------------------------------
// wxNotebook
// ----------------------------------------------------------------------------
// @@@ this class should really derive from wxTabCtrl, but the interface is not
// exactly the same, so I can't do it right now and instead we reimplement
// part of wxTabCtrl here
class wxNotebook : public wxNotebookBase
{
public:
// ctors
// -----
// default for dynamic class
wxNotebook();
// the same arguments as for wxControl (@@@ any special styles?)
wxNotebook(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxT("notebook"));
// Create() function
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxT("notebook"));
// dtor
~wxNotebook();
// accessors
// ---------
// set the currently selected page, return the index of the previously
// selected one (or -1 on error)
// NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events
int SetSelection(size_t nPage);
// get the currently selected page
int GetSelection() const { return m_nSelection; }
// set/get the title of a page
bool SetPageText(size_t nPage, const wxString& strText);
wxString GetPageText(size_t nPage) const;
// sets/returns item's image index in the current image list
int GetPageImage(size_t nPage) const;
bool SetPageImage(size_t nPage, int nImage);
// control the appearance of the notebook pages
// set the size (the same for all pages)
virtual void SetPageSize(const wxSize& size);
// set the padding between tabs (in pixels)
virtual void SetPadding(const wxSize& padding);
// sets the size of the tabs (assumes all tabs are the same size)
virtual void SetTabSize(const wxSize& sz);
// calculate size for wxNotebookSizer
wxSize CalcSizeFromPage(const wxSize& sizePage) const;
wxRect GetPageRect() const ;
/*
// get number of pages in the dialog
int GetPageCount() const;
// cycle thru the tabs
void AdvanceSelection(bool bForward = TRUE);
// currently it's always 1 because wxGTK doesn't support multi-row
// tab controls
int GetRowCount() const;
*/
// operations
// ----------
// remove all pages
bool DeleteAllPages();
// the same as AddPage(), but adds it at the specified position
bool InsertPage(size_t nPage,
wxNotebookPage *pPage,
const wxString& strText,
bool bSelect = FALSE,
int imageId = -1);
/*
// get the panel which represents the given page
wxNotebookPage *GetPage(int nPage) { return m_aPages[nPage]; }
*/
// callbacks
// ---------
void OnSize(wxSizeEvent& event);
void OnSelChange(wxNotebookEvent& event);
void OnSetFocus(wxFocusEvent& event);
void OnNavigationKey(wxNavigationKeyEvent& event);
void OnMouse(wxMouseEvent &event);
// implementation
// --------------
#if wxUSE_CONSTRAINTS
virtual void SetConstraintSizes(bool recurse = TRUE);
virtual bool DoPhase(int nPhase);
#endif
// base class virtuals
// -------------------
virtual void Command(wxCommandEvent& event);
protected:
virtual wxSize DoGetBestSize() const ;
virtual wxNotebookPage *DoRemovePage(size_t page) ;
virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ;
// common part of all ctors
void Init();
// helper functions
void ChangePage(int nOldSel, int nSel); // change pages
void MacSetupTabs();
// the icon indices
wxArrayInt m_images;
int m_nSelection; // the current selection (-1 if none)
DECLARE_DYNAMIC_CLASS(wxNotebook)
DECLARE_EVENT_TABLE()
};
#endif // _WX_NOTEBOOK_H_

View File

@@ -0,0 +1,68 @@
/////////////////////////////////////////////////////////////////////////////
// Name: palette.h
// Purpose: wxPalette class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PALETTE_H_
#define _WX_PALETTE_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "palette.h"
#endif
#include "wx/colour.h"
#include "wx/gdiobj.h"
class WXDLLEXPORT wxPalette;
class WXDLLEXPORT wxPaletteRefData: public wxGDIRefData
{
DECLARE_NO_COPY_CLASS(wxPaletteRefData)
friend class WXDLLEXPORT wxPalette;
public:
wxPaletteRefData();
~wxPaletteRefData();
protected:
wxColour* m_palette;
wxInt32 m_count ;
};
#define M_PALETTEDATA ((wxPaletteRefData *)m_refData)
class WXDLLEXPORT wxPalette: public wxGDIObject
{
DECLARE_DYNAMIC_CLASS(wxPalette)
public:
wxPalette();
wxPalette(const wxPalette& palette)
: wxGDIObject()
{ Ref(palette); }
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
~wxPalette();
bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
int GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const;
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
virtual bool Ok() const { return (m_refData != NULL) ; }
inline wxPalette& operator = (const wxPalette& palette) { if (*this == palette) return (*this); Ref(palette); return *this; }
inline bool operator == (const wxPalette& palette) { return m_refData == palette.m_refData; }
inline bool operator != (const wxPalette& palette) { return m_refData != palette.m_refData; }
/* TODO: implementation
inline WXHPALETTE GetHPALETTE() const { return (M_PALETTEDATA ? M_PALETTEDATA->m_hPalette : 0); }
void SetHPALETTE(WXHPALETTE pal);
*/
};
#endif
// _WX_PALETTE_H_

103
include/wx/mac/carbon/pen.h Normal file
View File

@@ -0,0 +1,103 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/mac/pen.h
// Purpose: wxPen class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PEN_H_
#define _WX_PEN_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "pen.h"
#endif
#include "wx/gdiobj.h"
#include "wx/colour.h"
#include "wx/bitmap.h"
class WXDLLEXPORT wxPen;
class WXDLLEXPORT wxPenRefData: public wxGDIRefData
{
friend class WXDLLEXPORT wxPen;
public:
wxPenRefData();
wxPenRefData(const wxPenRefData& data);
~wxPenRefData();
wxPenRefData& operator=(const wxPenRefData& data);
protected:
int m_width;
int m_style;
int m_join ;
int m_cap ;
wxBitmap m_stipple ;
int m_nbDash ;
wxDash * m_dash ;
wxColour m_colour;
/* TODO: implementation
WXHPEN m_hPen;
*/
};
#define M_PENDATA ((wxPenRefData *)m_refData)
// Pen
class WXDLLEXPORT wxPen: public wxGDIObject
{
DECLARE_DYNAMIC_CLASS(wxPen)
public:
wxPen();
wxPen(const wxColour& col, int width = 1, int style = wxSOLID);
wxPen(const wxBitmap& stipple, int width);
wxPen(const wxPen& pen)
: wxGDIObject()
{ Ref(pen); }
~wxPen();
inline wxPen& operator = (const wxPen& pen) { if (*this == pen) return (*this); Ref(pen); return *this; }
inline bool operator == (const wxPen& pen) { return m_refData == pen.m_refData; }
inline bool operator != (const wxPen& pen) { return m_refData != pen.m_refData; }
virtual bool Ok() const { return (m_refData != NULL) ; }
// Override in order to recreate the pen
void SetColour(const wxColour& col) ;
void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
void SetWidth(int width) ;
void SetStyle(int style) ;
void SetStipple(const wxBitmap& stipple) ;
void SetDashes(int nb_dashes, const wxDash *dash) ;
void SetJoin(int join) ;
void SetCap(int cap) ;
inline wxColour& GetColour() const { return (M_PENDATA ? M_PENDATA->m_colour : wxNullColour); };
inline int GetWidth() const { return (M_PENDATA ? M_PENDATA->m_width : 0); };
inline int GetStyle() const { return (M_PENDATA ? M_PENDATA->m_style : 0); };
inline int GetJoin() const { return (M_PENDATA ? M_PENDATA->m_join : 0); };
inline int GetCap() const { return (M_PENDATA ? M_PENDATA->m_cap : 0); };
inline int GetDashes(wxDash **ptr) const {
*ptr = (M_PENDATA ? M_PENDATA->m_dash : (wxDash*) NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 0);
}
inline wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : (wxBitmap*) NULL); };
// Implementation
// Useful helper: create the brush resource
bool RealizeResource();
// When setting properties, we must make sure we're not changing
// another object
void Unshare();
};
#endif
// _WX_PEN_H_

View File

@@ -0,0 +1,37 @@
/////////////////////////////////////////////////////////////////////////////
// Name: pnghand.h
// Purpose: PNG bitmap handler
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "pnghand.h"
#endif
#ifndef _WX_PNGHAND_H_
#define _WX_PNGHAND_H_
class WXDLLEXPORT wxPNGFileHandler: public wxBitmapHandler
{
DECLARE_DYNAMIC_CLASS(wxPNGFileHandler)
public:
inline wxPNGFileHandler(void)
{
m_name = wxT("PNG bitmap file");
m_extension = wxT("bmp");
m_type = wxBITMAP_TYPE_PNG;
};
virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
int desiredWidth, int desiredHeight);
virtual bool SaveFile(const wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = NULL);
};
#endif
// _WX_PNGHAND_H_

View File

@@ -0,0 +1,290 @@
/*
* File: pngread.h
* Purpose: PNG file reader
* Author: Alejandro Aguilar Sierra/Julian Smart
* Created: 1995
* Copyright: (c) 1995, Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
*
*
*/
#ifndef _WX_PNGREAD__
#define _WX_PNGREAD__
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "pngread.h"
#endif
#ifndef byte
typedef unsigned char byte;
#endif
#define WXIMA_COLORS DIB_PAL_COLORS
typedef byte * ImagePointerType;
typedef struct
{
byte red;
byte green;
byte blue;
} rgb_color_struct;
#define COLORTYPE_PALETTE 1
#define COLORTYPE_COLOR 2
#define COLORTYPE_ALPHA 4
class wxPNGReader
{
protected:
int filetype;
char filename[255];
ImagePointerType RawImage; // Image data
int Width, Height; // Dimensions
int Depth; // (bits x pixel)
int ColorType; // Bit 1 = Palette used
// Bit 2 = Color used
// Bit 3 = Alpha used
long EfeWidth; // Efective Width
void *lpbi;
int bgindex;
wxPalette* m_palette;
bool imageOK;
friend class wxPNGReaderIter;
public:
wxPNGReader(void);
wxPNGReader (char* ImageFileName); // Read an image file
virtual ~wxPNGReader ();
void Create(int width, int height, int deep, int colortype=-1);
bool ReadFile( char* ImageFileName=0 );
bool SaveFile( char* ImageFileName=0 );
bool SaveXPM(char *filename, char *name = 0);
int GetWidth( void ) const { return Width; };
int GetHeight( void ) const { return Height; };
int GetDepth( void ) const { return Depth; };
int GetColorType( void ) const { return ColorType; };
int GetIndex(int x, int y);
bool GetRGB(int x, int y, byte* r, byte* g, byte* b);
bool SetIndex(int x, int y, int index);
bool SetRGB(int x, int y, byte r, byte g, byte b);
// ColorMap settings
bool SetPalette(wxPalette* colourmap);
bool SetPalette(int n, rgb_color_struct *rgb_struct);
bool SetPalette(int n, byte *r, byte *g=0, byte *b=0);
wxPalette* GetPalette() const { return m_palette; }
void NullData();
inline int GetBGIndex(void) { return bgindex; }
inline bool Inside(int x, int y)
{ return (0<=y && y<Height && 0<=x && x<Width); }
virtual wxBitmap *GetBitmap(void);
virtual bool InstantiateBitmap(wxBitmap *bitmap);
wxMask *CreateMask(void);
inline bool Ok(void) { return imageOK; }
};
class wxPNGReaderIter
{
protected:
int Itx, Ity; // Counters
int Stepx, Stepy;
ImagePointerType IterImage; // Image pointer
wxPNGReader *ima;
public:
// Constructors
wxPNGReaderIter ( void );
wxPNGReaderIter ( wxPNGReader *imax );
operator wxPNGReader* ();
// Iterators
bool ItOK ();
void reset ();
void upset ();
void SetRow(byte *buf, int n);
void GetRow(byte *buf, int n);
byte GetByte( ) { return IterImage[Itx]; }
void SetByte(byte b) { IterImage[Itx] = b; }
ImagePointerType GetRow(void);
bool NextRow();
bool PrevRow();
bool NextByte();
bool PrevByte();
void SetSteps(int x, int y=0) { Stepx = x; Stepy = y; }
void GetSteps(int *x, int *y) { *x = Stepx; *y = Stepy; }
bool NextStep();
bool PrevStep();
////////////////////////// AD - for interlace ///////////////////////////////
void SetY(int y);
/////////////////////////////////////////////////////////////////////////////
};
inline
wxPNGReaderIter::wxPNGReaderIter(void)
{
ima = 0;
IterImage = 0;
Itx = Ity = 0;
Stepx = Stepy = 0;
}
inline
wxPNGReaderIter::wxPNGReaderIter(wxPNGReader *imax): ima(imax)
{
if (ima)
IterImage = ima->RawImage;
Itx = Ity = 0;
Stepx = Stepy = 0;
}
inline
wxPNGReaderIter::operator wxPNGReader* ()
{
return ima;
}
inline
bool wxPNGReaderIter::ItOK ()
{
if (ima)
return ima->Inside(Itx, Ity);
else
return FALSE;
}
inline void wxPNGReaderIter::reset()
{
IterImage = ima->RawImage;
Itx = Ity = 0;
}
inline void wxPNGReaderIter::upset()
{
Itx = 0;
Ity = ima->Height-1;
IterImage = ima->RawImage + ima->EfeWidth*(ima->Height-1);
}
inline bool wxPNGReaderIter::NextRow()
{
if (++Ity >= ima->Height) return 0;
IterImage += ima->EfeWidth;
return 1;
}
inline bool wxPNGReaderIter::PrevRow()
{
if (--Ity < 0) return 0;
IterImage -= ima->EfeWidth;
return 1;
}
////////////////////////// AD - for interlace ///////////////////////////////
inline void wxPNGReaderIter::SetY(int y)
{
if ((y < 0) || (y > ima->Height)) return;
Ity = y;
IterImage = ima->RawImage + ima->EfeWidth*y;
}
/////////////////////////////////////////////////////////////////////////////
inline void wxPNGReaderIter::SetRow(byte *buf, int n)
{
// Here should be bcopy or memcpy
//_fmemcpy(IterImage, (void far *)buf, n);
if (n<0)
n = ima->GetWidth();
for (int i=0; i<n; i++) IterImage[i] = buf[i];
}
inline void wxPNGReaderIter::GetRow(byte *buf, int n)
{
for (int i=0; i<n; i++) buf[i] = IterImage[i];
}
inline ImagePointerType wxPNGReaderIter::GetRow()
{
return IterImage;
}
inline bool wxPNGReaderIter::NextByte()
{
if (++Itx < ima->EfeWidth)
return 1;
else
if (++Ity < ima->Height)
{
IterImage += ima->EfeWidth;
Itx = 0;
return 1;
} else
return 0;
}
inline bool wxPNGReaderIter::PrevByte()
{
if (--Itx >= 0)
return 1;
else
if (--Ity >= 0)
{
IterImage -= ima->EfeWidth;
Itx = 0;
return 1;
} else
return 0;
}
inline bool wxPNGReaderIter::NextStep()
{
Itx += Stepx;
if (Itx < ima->EfeWidth)
return 1;
else {
Ity += Stepy;
if (Ity < ima->Height)
{
IterImage += ima->EfeWidth;
Itx = 0;
return 1;
} else
return 0;
}
}
inline bool wxPNGReaderIter::PrevStep()
{
Itx -= Stepx;
if (Itx >= 0)
return 1;
else {
Ity -= Stepy;
if (Ity >= 0 && Ity < ima->Height)
{
IterImage -= ima->EfeWidth;
Itx = 0;
return 1;
} else
return 0;
}
}
#endif

View File

@@ -0,0 +1,73 @@
/////////////////////////////////////////////////////////////////////////////
// Name: printdlg.h
// Purpose: wxPrintDialog, wxPageSetupDialog classes.
// Use generic, PostScript version if no
// platform-specific implementation.
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PRINTDLG_H_
#define _WX_PRINTDLG_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "printdlg.h"
#endif
#include "wx/dialog.h"
#include "wx/cmndata.h"
/*
* wxPrinterDialog
* The common dialog for printing.
*/
class WXDLLEXPORT wxDC;
class WXDLLEXPORT wxPrintDialog: public wxDialog
{
DECLARE_DYNAMIC_CLASS(wxPrintDialog)
public:
wxPrintDialog();
wxPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL);
wxPrintDialog(wxWindow *parent, wxPrintData* data );
~wxPrintDialog();
bool Create(wxWindow *parent, wxPrintDialogData* data = NULL);
virtual int ShowModal();
wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; }
wxPrintData& GetPrintData() { return m_printDialogData.GetPrintData(); }
virtual wxDC *GetPrintDC();
private:
wxPrintDialogData m_printDialogData;
wxDC* m_printerDC;
bool m_destroyDC;
wxWindow* m_dialogParent;
};
class WXDLLEXPORT wxPageSetupDialog: public wxDialog
{
DECLARE_DYNAMIC_CLASS(wxPageSetupDialog)
public:
wxPageSetupDialog();
wxPageSetupDialog(wxWindow *parent, wxPageSetupData *data = NULL);
~wxPageSetupDialog();
bool Create(wxWindow *parent, wxPageSetupData *data = NULL);
virtual int ShowModal();
inline wxPageSetupData& GetPageSetupData() { return m_pageSetupData; }
private:
wxPageSetupData m_pageSetupData;
wxWindow* m_dialogParent;
};
#endif
// _WX_PRINTDLG_H_

View File

@@ -0,0 +1,64 @@
/////////////////////////////////////////////////////////////////////////////
// Name: printwin.h
// Purpose: wxWindowsPrinter, wxWindowsPrintPreview classes
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PRINTWIN_H_
#define _WX_PRINTWIN_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "printwin.h"
#endif
#include "wx/prntbase.h"
/*
* Represents the printer: manages printing a wxPrintout object
*/
class WXDLLEXPORT wxMacPrinter: public wxPrinterBase
{
DECLARE_DYNAMIC_CLASS(wxMacPrinter)
public:
wxMacPrinter(wxPrintDialogData *data = NULL);
virtual ~wxMacPrinter();
virtual bool Print(wxWindow *parent,
wxPrintout *printout,
bool prompt = TRUE);
virtual wxDC* PrintDialog(wxWindow *parent);
virtual bool Setup(wxWindow *parent);
};
/*
* wxPrintPreview
* Programmer creates an object of this class to preview a wxPrintout.
*/
class WXDLLEXPORT wxMacPrintPreview: public wxPrintPreviewBase
{
DECLARE_CLASS(wxMacPrintPreview)
public:
wxMacPrintPreview(wxPrintout *printout,
wxPrintout *printoutForPrinting = NULL,
wxPrintDialogData *data = NULL);
wxMacPrintPreview(wxPrintout *printout,
wxPrintout *printoutForPrinting,
wxPrintData *data);
virtual ~wxMacPrintPreview();
virtual bool Print(bool interactive);
virtual void DetermineScaling();
};
#endif
// _WX_PRINTWIN_H_

View File

@@ -0,0 +1,362 @@
/////////////////////////////////////////////////////////////////////////////
// Name: private.h
// Purpose: Private declarations: as this header is only included by
// wxWindows itself, it may contain identifiers which don't start
// with "wx".
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PRIVATE_H_
#define _WX_PRIVATE_H_
#include "wx/defs.h"
#include "wx/app.h"
#ifdef __DARWIN__
# include <Carbon/Carbon.h>
#else
# include <Debugging.h>
# include <Quickdraw.h>
# include <Appearance.h>
# include <Folders.h>
# include <Controls.h>
# include <ControlDefinitions.h>
# include <LowMem.h>
# include <Gestalt.h>
#endif
#if UNIVERSAL_INTERFACES_VERSION < 0x0340
#error "please update to Apple's lastest universal headers from http://developer.apple.com/sdk/"
#endif
#if wxUSE_GUI
#include "wx/window.h"
class wxMacPortStateHelper
{
DECLARE_NO_COPY_CLASS(wxMacPortStateHelper)
public:
wxMacPortStateHelper( GrafPtr newport) ;
wxMacPortStateHelper() ;
~wxMacPortStateHelper() ;
void Setup( GrafPtr newport ) ;
void Clear() ;
bool IsCleared() { return m_clip == NULL ; }
GrafPtr GetCurrentPort() { return m_currentPort ; }
private:
GrafPtr m_currentPort ;
GrafPtr m_oldPort ;
RgnHandle m_clip ;
ThemeDrawingState m_drawingState ;
short m_textFont ;
short m_textSize ;
short m_textStyle ;
short m_textMode ;
} ;
class WXDLLEXPORT wxMacPortSaver
{
DECLARE_NO_COPY_CLASS(wxMacPortSaver)
public:
wxMacPortSaver( GrafPtr port )
{
::GetPort( &m_port ) ;
::SetPort( port ) ;
}
~wxMacPortSaver()
{
::SetPort( m_port ) ;
}
private :
GrafPtr m_port ;
} ;
class WXDLLEXPORT wxMacPortSetter
{
DECLARE_NO_COPY_CLASS(wxMacPortSetter)
public:
wxMacPortSetter( const wxDC* dc ) ;
~wxMacPortSetter() ;
private:
wxMacPortStateHelper m_ph ;
const wxDC* m_dc ;
} ;
/*
Clips to the visible region of a control within the current port
*/
class WXDLLEXPORT wxMacWindowClipper : public wxMacPortSaver
{
DECLARE_NO_COPY_CLASS(wxMacWindowClipper)
public:
wxMacWindowClipper( const wxWindow* win ) ;
~wxMacWindowClipper() ;
private:
RgnHandle m_formerClip ;
RgnHandle m_newClip ;
} ;
/*
class wxMacDrawingHelper
{
DECLARE_NO_COPY_CLASS(wxMacDrawingHelper)
public:
wxMacDrawingHelper( wxWindowMac * theWindow , bool clientArea = false ) ;
~wxMacDrawingHelper() ;
bool Ok() { return m_ok ; }
void LocalToWindow( Rect *rect) { OffsetRect( rect , m_origin.h , m_origin.v ) ; }
void LocalToWindow( Point *pt ) { AddPt( m_origin , pt ) ; }
void LocalToWindow( RgnHandle rgn ) { OffsetRgn( rgn , m_origin.h , m_origin.v ) ; }
const Point& GetOrigin() { return m_origin ; }
private:
Point m_origin ;
GrafPtr m_formerPort ;
GrafPtr m_currentPort ;
PenState m_savedPenState ;
bool m_ok ;
} ;
*/
// app.h
bool wxMacConvertEventToRecord( EventRef event , EventRecord *rec) ;
#endif // wxUSE_GUI
// filefn.h
WXDLLEXPORT wxString wxMacFSSpec2MacFilename( const FSSpec *spec ) ;
WXDLLEXPORT void wxMacFilename2FSSpec( const char *path , FSSpec *spec ) ;
WXDLLEXPORT void wxMacFilename2FSSpec( const wxChar *path , FSSpec *spec ) ;
# ifndef __DARWIN__
// Mac file names are POSIX (Unix style) under Darwin, so these are not needed
WXDLLEXPORT wxString wxMacFSSpec2UnixFilename( const FSSpec *spec ) ;
WXDLLEXPORT void wxUnixFilename2FSSpec( const char *path , FSSpec *spec ) ;
WXDLLEXPORT wxString wxMac2UnixFilename( const char *s) ;
WXDLLEXPORT wxString wxUnix2MacFilename( const char *s);
# endif
// utils.h
WXDLLEXPORT wxString wxMacFindFolder(short vRefNum,
OSType folderType,
Boolean createFolder);
#if wxUSE_GUI
GWorldPtr wxMacCreateGWorld( int width , int height , int depth ) ;
void wxMacDestroyGWorld( GWorldPtr gw ) ;
PicHandle wxMacCreatePict( GWorldPtr gw , GWorldPtr mask = NULL ) ;
CIconHandle wxMacCreateCIcon(GWorldPtr image , GWorldPtr mask , short dstDepth , short iconSize ) ;
void wxMacSetColorTableEntry( CTabHandle newColors , int index , int red , int green , int blue ) ;
CTabHandle wxMacCreateColorTable( int numColors ) ;
void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bitmap , int forceType = 0 ) ;
#define MAC_WXCOLORREF(a) (*((RGBColor*)&(a)))
#define MAC_WXHBITMAP(a) (GWorldPtr(a))
#define MAC_WXHMETAFILE(a) (PicHandle(a))
#define MAC_WXHICON(a) (CIconHandle(a))
#define MAC_WXHCURSOR(a) (CursHandle(a))
#define MAC_WXHRGN(a) (RgnHandle(a))
#define MAC_WXHWND(a) (WindowPtr(a))
#define MAC_WXRECPTR(a) ((Rect*)a)
#define MAC_WXPOINTPTR(a) ((Point*)a)
#define MAC_WXHMENU(a) ((MenuHandle)a)
struct wxOpaqueWindowRef
{
wxOpaqueWindowRef( WindowRef ref ) { m_data = ref ; }
operator WindowRef() { return m_data ; }
private :
WindowRef m_data ;
} ;
wxWindow *wxFindControlFromMacControl(ControlRef inControl ) ;
wxTopLevelWindowMac* wxFindWinFromMacWindow( WindowRef inWindow ) ;
extern wxWindow* g_MacLastWindow ;
pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , EventRef event , void *data ) ;
Rect wxMacGetBoundsForControl( wxWindow* window , const wxPoint& pos , const wxSize &size ) ;
template<typename T> EventParamType wxMacGetEventParamType() { wxFAIL_MSG( wxT("Unknown Param Type") ) ; return 0 ; }
template<> inline EventParamType wxMacGetEventParamType<RgnHandle>() { return typeQDRgnHandle ; }
template<> inline EventParamType wxMacGetEventParamType<ControlRef>() { return typeControlRef ; }
template<> inline EventParamType wxMacGetEventParamType<WindowRef>() { return typeWindowRef ; }
template<> inline EventParamType wxMacGetEventParamType<MenuRef>() { return typeMenuRef ; }
template<> inline EventParamType wxMacGetEventParamType<EventRef>() { return typeEventRef ; }
template<> inline EventParamType wxMacGetEventParamType<Point>() { return typeQDPoint ; }
template<> inline EventParamType wxMacGetEventParamType<Rect>() { return typeQDRectangle ; }
template<> inline EventParamType wxMacGetEventParamType<Boolean>() { return typeBoolean ; }
#if TARGET_API_MAC_OSX
template<> inline EventParamType wxMacGetEventParamType<HIPoint>() { return typeHIPoint ; }
template<> inline EventParamType wxMacGetEventParamType<HISize>() { return typeHISize ; }
template<> inline EventParamType wxMacGetEventParamType<HIRect>() { return typeHIRect ; }
template<> inline EventParamType wxMacGetEventParamType<void*>() { return typeVoidPtr ; }
#endif
template<> inline EventParamType wxMacGetEventParamType<Collection>() { return typeCollection ; }
template<> inline EventParamType wxMacGetEventParamType<CGContextRef>() { return typeCGContextRef ; }
/*
These are ambiguous
template<> EventParamType wxMacGetEventParamType<GrafPtr>() { return typeGrafPtr ; }
template<> EventParamType wxMacGetEventParamType<OSStatus>() { return typeOSStatus ; }
template<> EventParamType wxMacGetEventParamType<CFIndex>() { return typeCFIndex ; }
template<> EventParamType wxMacGetEventParamType<GWorldPtr>() { return typeGWorldPtr ; }
*/
class wxMacCarbonEvent
{
public :
wxMacCarbonEvent( EventRef event )
{
m_eventRef = event ;
}
OSStatus GetParameter( EventParamName inName, EventParamType inDesiredType, UInt32 inBufferSize, void * outData) ;
template <typename T> OSStatus GetParameter( EventParamName inName, EventParamType type , T *data )
{
return GetParameter( inName, type , sizeof( T ) , data ) ;
}
template <typename T> OSStatus GetParameter( EventParamName inName, T *data )
{
return GetParameter<T>( inName, wxMacGetEventParamType<T>() , data ) ;
}
template <typename T> T GetParameter( EventParamName inName )
{
T value ;
verify_noerr( GetParameter<T>( inName, &value ) ) ;
return value ;
}
template <typename T> T GetParameter( EventParamName inName, EventParamType inDesiredType )
{
T value ;
verify_noerr( GetParameter<T>( inName, inDesiredType , &value ) ) ;
return value ;
}
OSStatus SetParameter( EventParamName inName, EventParamType inType, UInt32 inSize, void * inData) ;
template <typename T> OSStatus SetParameter( EventParamName inName, EventParamType type , T *data )
{
return SetParameter( inName, type , sizeof( T ) , data ) ;
}
template <typename T> OSStatus SetParameter( EventParamName inName, T *data )
{
return SetParameter<T>( inName, wxMacGetEventParamType<T>() , data ) ;
}
EventKind GetKind()
{
return ::GetEventKind( m_eventRef ) ;
}
EventTime GetTime()
{
return ::GetEventTime( m_eventRef ) ;
}
UInt32 GetTicks()
{
return EventTimeToTicks( GetTime() ) ;
}
protected :
EventRef m_eventRef ;
} ;
#endif // wxUSE_GUI
//---------------------------------------------------------------------------
// wxMac string conversions
//---------------------------------------------------------------------------
void wxMacSetupConverters() ;
void wxMacCleanupConverters() ;
void wxMacStringToPascal( const wxString&from , StringPtr to ) ;
wxString wxMacMakeStringFromPascal( ConstStringPtr from ) ;
void wxMacConvertNewlines13To10( char * data ) ;
void wxMacConvertNewlines10To13( char * data ) ;
void wxMacConvertNewlines13To10( wxString *data ) ;
void wxMacConvertNewlines10To13( wxString *data ) ;
#if wxUSE_UNICODE
void wxMacConvertNewlines13To10( wxChar * data ) ;
void wxMacConvertNewlines10To13( wxChar * data ) ;
#endif
#if TARGET_CARBON
class wxMacCFStringHolder
{
public:
wxMacCFStringHolder()
{
m_cfs = NULL ;
m_release = false ;
}
wxMacCFStringHolder(const wxString &str , wxFontEncoding encoding )
{
m_cfs = NULL ;
m_release = false ;
Assign( str , encoding ) ;
}
wxMacCFStringHolder(CFStringRef ref , bool release = true )
{
m_cfs = ref ;
m_release = release ;
}
~wxMacCFStringHolder()
{
Release() ;
}
CFStringRef Detach()
{
CFStringRef retval = m_cfs ;
m_release = false ;
m_cfs = NULL ;
return retval ;
}
void Release()
{
if ( m_release && m_cfs)
CFRelease( m_cfs ) ;
m_cfs = NULL ;
}
void Assign( const wxString &str , wxFontEncoding encoding ) ;
operator CFStringRef () { return m_cfs; }
wxString AsString( wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ;
private:
CFStringRef m_cfs;
bool m_release ;
} ;
#endif
wxUint32 wxMacGetSystemEncFromFontEnc(wxFontEncoding encoding) ;
wxFontEncoding wxMacGetFontEncFromSystemEnc(wxUint32 encoding) ;
#endif
// _WX_PRIVATE_H_

View File

@@ -0,0 +1,63 @@
#include <wx/wx.h>
#include <IOKit/IOKitLib.h>
#include <IOKit/IOCFPlugIn.h>
#include <IOKit/hid/IOHIDLib.h>
#include <IOKit/hid/IOHIDKeys.h>
#include <Kernel/IOKit/hidsystem/IOHIDUsageTables.h>
#include <mach/mach.h>
//Utility wrapper around CFArray
class wxCFArray
{
public:
wxCFArray(CFTypeRef pData) : pArray((CFArrayRef) pData) {}
CFTypeRef operator [] (const int& nIndex) {return CFArrayGetValueAtIndex(pArray, nIndex); }
int Count() {return CFArrayGetCount(pArray);}
private:
CFArrayRef pArray;
};
//
// A wrapper around OS X HID Manager procedures.
// The tutorial "Working With HID Class Device Interfaces" Is
// Quite good, as is the sample program associated with it
// (Depite the author's protests!).
class wxHIDDevice
{
public:
wxHIDDevice() : m_ppDevice(NULL), m_ppQueue(NULL), m_pCookies(NULL) {}
//kHIDPage_GenericDesktop
//kHIDUsage_GD_Joystick,kHIDUsage_GD_Mouse,kHIDUsage_GD_Keyboard
bool Create (const int& nClass = -1, const int& nType = -1);
inline void AddCookie(CFTypeRef Data, const int& i);
inline void AddCookieInQueue(CFTypeRef Data, const int& i);
inline void InitCookies(const size_t& dwSize, bool bQueue = false);
//Must be implemented by derived classes
//builds the cookie array -
//first call InitCookies to initialize the cookie
//array, then AddCookie to add a cookie at a certain point in an array
virtual void BuildCookies(wxCFArray& Array) = 0;
//checks to see whether the cookie at index nIndex is active (element value != 0)
bool IsActive(const int& nIndex);
//closes the device and cleans the queue and cookies
virtual ~wxHIDDevice();
private:
IOHIDDeviceInterface** m_ppDevice; //this, essentially
IOHIDQueueInterface** m_ppQueue; //queue (if we want one)
IOHIDElementCookie* m_pCookies; //cookies
const char* m_szName; //(product) name
mach_port_t m_pPort;
};
class wxHIDKeyboard : public wxHIDDevice
{
public:
bool Create();
virtual void BuildCookies(wxCFArray& Array);
};

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