Commit Graph

203 Commits

Author SHA1 Message Date
Włodzimierz Skiba
7d8268a1d6 wxTextPos for all GetLastPosition with constants for special cases. Make it virtual everywhere. Avoid doubling typedefs. Always include textctrl.h for combobox.h. Source cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-19 16:25:34 +00:00
David Elliott
3e21fc053d Moved Clear() implementation into wxDC using a new virtual CocoaGetBounds()
to determine the rect to clear.  Also added CocoaUnapplyTransformations()
to bring the coordinate system back into Cocoa coordinates for those
cases such as Clear() where it makes more sense.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31440 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-17 21:30:53 +00:00
David Elliott
9d208085a7 Forgot to commit this as part of the CocoaGetWxToBoundsTransform change.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-14 15:02:54 +00:00
David Elliott
4db3c8ac63 Separate NSAffineTransform creation out of wxDC::CocoaApplyTransform into
static wxDC::CocoaGetWxToBoundsTransform.  Create the transform and store
it as a member variable in wxDC when focus is locked on the DC.
For wxClientDC and wxPaintDC call a new wxWindow::CocoaGetWxToBoundsTransform
which will eventually handle scrolling.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-14 14:22:03 +00:00
Włodzimierz Skiba
630ad6c6b6 Common default notebook name.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-13 20:30:21 +00:00
David Elliott
34c9978dac Add new methods to transform coordinates expressed in Cocoa's bounds rect to
and from those expressed in wxWidgets fashion.  Use these new methods to do
the translation for mouse events, child window position, and dirty rects.
Also improve DoMoveWindow to only dirty the old and new rects of the
control within its superview rather than the entire superview.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31332 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-12 20:51:35 +00:00
David Elliott
f298b203b5 Renamed the wxWindowCocoaScroller class to wxWindowCocoaScrollView because
it was confusing.  Scroller is the Cocoa term for a scroll bar.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-11 01:55:42 +00:00
David Elliott
d8fdd58fa3 Add constructor and Set taking NSColor.
Change eqauality operator to check if the NSColor objects are the same
instance or if all of the color components (m_red/green/blue) are identical.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-10 18:37:36 +00:00
David Elliott
bf428459fc Added wxMemoryDC::Clear()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-10 01:52:08 +00:00
Włodzimierz Skiba
555f645a40 wxDialog::Show is virtual as elsewhere. Native PalmOS progress dialog.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31194 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-12-31 07:08:11 +00:00
David Elliott
4170c465f4 Added wxBitmap::UseAlpha() stub.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-12-29 04:00:28 +00:00
David Elliott
b6e8e2417d Fixed typo(?)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-12-16 22:51:10 +00:00
Włodzimierz Skiba
b1263dcfa3 Make ComputeScaleAndOrigin() as virtual part of wxDCBase and this way present on missing platforms. Add into manaul too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-12-16 21:24:45 +00:00
Julian Smart
150e31d208 Added further 'missing' wxTextCtrl-like functions to wxComboBox
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-12-09 15:16:51 +00:00
Włodzimierz Skiba
cb9d5bd07e wxBrushBase between wxBrush and wxGDIObject (class follows wxFontBase model).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-12-03 15:31:31 +00:00
Włodzimierz Skiba
ab9d0a8ca3 IS_HATCH macro replaced with wxBrush::IsHatch() + source and docs little cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-30 18:46:20 +00:00
David Elliott
e2eafeff03 Implement toolbar tool clicks. Get rid of wxNSActionCell stuff because
Cells send their action from the view anyway so we'd have no way of knowing
which tool was clicked.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-17 18:02:56 +00:00
David Elliott
4092a27504 Change friendship so that the base implementation class is the friend.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-22 15:42:16 +00:00
David Elliott
85c9f98b50 Rewrote wxSound:
* Get rid of #if wxUSE_SOUND from header.  wx/sound.h checks this already.
* Get rid of pragma interface/implementation. Apple GCC dislikes them anyway.
* Allow source file to use precompiled headers (wx/wxprec.h)
* Include only needed AppKit/Foundation headers, not AppKit/AppKit.h.
* Implement simple constructors inline in header.
* Get rid of m_sndname and m_waveLength instance variables.  They aren't used.
* Add copy constructor (why not).
* Move implementation of byte-array constructor into LoadWAV for consistency
  with UNIX wxSound.
* LoadWAV (what was in the constructor) now properly allocs, inits, and
  releases NSData.  The old code for this was not valid.
* Rename lastSound to s_currentSound.
* Rename isLastSoundLooping to s_loopCurrentSound.
* Ignore the sound:didFinishPlaying: delegate message if it is received
  for an NSSound other than s_currentSound.
* Create should not Stop the current sound.
* Don't use NSBundle to get a resource sound but use [NSSound soundNamed:]
  which will include system sounds.
* Playing a sound synchronously uses wxEventLoop::Dispatch which will
  really block (not spin the CPU like Yield).  The sound is considered
  finished playing when s_currentSound is set to something else.  In order
  to make sure we don't get stuck in this event loop the delegate
  calls wxApp::WakeUpIdle if it releases s_currentSound.
* Have IsPlaying() check to make sure s_currentSound is not nil since
  only messages returning another object or void are allowed to be
  sent to nil objects.

Changes involving retain/release
* Get rid of comment about tricky API, it's not.
* Get rid of isLastSoundInScope. Cocoa has proper reference counting.
* Add SetNSSound which, like the rest of wxCocoa, retains/releases
  appropriately, sets the delegate, and logs when WXTRACE=COCOA_RetainRelease.
* Destructor does SetNSSound(nil) which will always release the NSSound.
  Create and LoadWAV use SetNSSound method like the rest of wxCocoa.
* Make the delegate always release s_currentSound if not (or if done) looping.
  DoPlay sets s_currentSound to m_cocoaNSSound after retaining it so that
  the delegate can always safely release it.
* Stop, like everything else, does not need check of isLastSoundInScope


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-20 21:04:52 +00:00
David Elliott
1e85b547a5 Added CocoaSetKeyEquivalent() that sets the accelerators. Only implemented
for letters, numbers, and ascii control characters. TODO: up/down/etc.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-20 19:18:46 +00:00
David Elliott
a2c1097b8a Renamed m_hSnd to m_cocoaNSSound (match rest of wxCocoa).
Create delegate as a static member shared by all instances.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-18 22:12:57 +00:00
David Elliott
4fca6ee1a6 Removed some extraneous whitespace.
Changed YES/NO to true/false; do not confuse BOOL (Objective-C) with bool (C++).
Changed some of the indentation to match that the rest of wxCocoa.

There was an if (isLastSoundInScope = NO) which I think was wrong not only
because it used NO rather than false but also because it's an assignment
rather than a test.  Changed it to if (!isLastSoundInScope).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-18 21:41:34 +00:00
David Elliott
f31424dbe9 wxCocoa: Add native file dialog from Ryan Norton. Modified patch #1039368
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1039368&group_id=9863


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-18 19:15:42 +00:00
David Elliott
f1d9e1ec6b wxCocoa: Added wxTaskBarIcon
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-15 22:52:28 +00:00
David Elliott
950432e407 Allow the wxMenu to be owned by the NSMenu so that it can be returned
from methods which Cocoa calls when a menu is to be popped up.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-15 03:06:50 +00:00
David Elliott
3312496dcc Allow the dealloc message to be caught
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-15 02:55:15 +00:00
David Elliott
d04995b3a6 Use wxObjcAutoRefFromAlloc for sm_cocoaTarget.
Move some processing code from wxMenuItemAction to CocoaItemSelected.
Add Cocoa_validateMenuItem and use it instead of calling IsEnabled directly.
Do not set the target or action for wxMenuItem that open submenus.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-15 01:39:35 +00:00
David Elliott
ccdc365485 Removed empty wxCocoa wxFileDialog implementation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29833 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-14 03:39:47 +00:00
David Elliott
ec7c50a5ed Removed empty wxCocoa taskbar files and broken files.bkl commit.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29831 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-14 03:01:44 +00:00
Ryan Norton
f7e98dee7e cocoa doesn't need system framework - string conversion for cocoa - focus for cocoa - a bit of change for string unit tests for new functionality
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29780 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-11 02:02:30 +00:00
Ryan Norton
1e15159472 various cleanups
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-08 01:26:43 +00:00
Ryan Norton
0c0be4a318 wxSound for wxCocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-08 00:47:47 +00:00
Ryan Norton
51259762d5 wxDisplay for wxCocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-08 00:40:19 +00:00
Ryan Norton
c58ae5f298 fix a bunch of warnings in unicode build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-07 17:45:04 +00:00
Ryan Norton
dcb6810279 2.5.3 - cleanups, fixes, etc. etc. -
1. Various stubs for wxCocoa (and the bakefile entries for them)
2. Definitions for some wxCocoa cocoa types in defs.h
3. Hack to attempt to fix SYNC sound for mac carbon
4. Fix for wxCocoa and 10.2 (Dave - I'm already around doing some stuff anyway - I'll go ahead and save you the trouble).
5. 10.2 unicode layer
6. Strings null-char fixes (stems from chartraits patch - essentially the patch minus the chartraits part - HAHA :)) [note to self - swap the 2nd and 3rd params of wxMemchr if you use chartraits and vice versa]
	* If you have time please run the strings and stdstrings cppunit test suite
	* Also add more test suites if you want - more is always better :)
	* This does not include any fixes for mbtowc etc functions as outlined on the ml

7. An attempt to update wxArray docs a little
8. wx/process.h build fix for wxCocoa
9. Unicode fixes in app.mm for wxCocoa
10. Remove newer font panel after Stefan's suggestion


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-07 08:53:48 +00:00
Ryan Norton
5558135c48 cursors for cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-06 22:11:46 +00:00
Ryan Norton
2619179042 cocoa tooltips. Remove runtime warning from 10.2 (dave - I was too lazy to change this from my local copy, feel free to commit over this if you want)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-06 21:09:47 +00:00
David Elliott
908686c52e Implement wxBitmapButton::DoGetBestSize() to call wxButtonBase version so
that the newly implement wxButton::DoGetBestSize() is not used.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29659 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-05 01:50:17 +00:00
David Elliott
635f01472e Implement wxButtonBase::GetDefaultSize()
Implement wxButton::DoGetBestSize() to return at least 68 pixel width unless
wxBU_EXACTFIT flag is given.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-05 01:49:05 +00:00
David Elliott
bd2af42857 wxCocoa: Added (mostly) stubs for wxGLCanvas and friends.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-01 14:23:59 +00:00
David Elliott
a1f4186efa wxStaticBox constructor is not supposed to take a wxValidator
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29524 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-09-29 05:18:38 +00:00
Václav Slavík
5f7bcb48fd new stock buttons API
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-08-30 14:42:51 +00:00
David Elliott
b9974b8417 Use variable name winid instead of id. id is a typedef in Objective-C headers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-08-16 02:35:25 +00:00
Václav Slavík
401e3b6e5f added stock buttons support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-08-15 15:56:56 +00:00
David Elliott
feb8276801 * Do not use class posing to handle target/action.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-24 15:14:33 +00:00
David Elliott
5369a0543e wxCocoa: Added wxScrollBar
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-23 15:26:44 +00:00
David Elliott
6fbcc6cac3 Observe NSControlTintDidChangeNotification in the application delegate.
TODO: Actually implement this to do something.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27932 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-22 04:16:22 +00:00
Václav Slavík
85f6b408df split wxRegion(wxBitmap) ctor into two ctors with clearer semantics
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27606 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-03 21:13:52 +00:00
Julian Smart
655719367a Use old licence name
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 20:53:33 +00:00
Julian Smart
77ffb5937e Name and version changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 14:56:36 +00:00