Commit Graph

219 Commits

Author SHA1 Message Date
David Elliott
070b7b8510 Set m_cocoaDataSource = NULL in default constructor so subclasses that
don't call our Create function (e.g. wxCheckListBox) don't crash on destruction.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-06-18 03:39:46 +00:00
Ryan Norton
d803176a8e implement label setting
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-04-22 00:49:43 +00:00
Ryan Norton
4930046b96 compilo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-04-19 03:41:43 +00:00
Vadim Zeitlin
1d39019c67 compilation fix: use wxSB_HORIZONTAL/VERTICAL instead of wxSL_XXX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-04-16 14:10:24 +00:00
David Elliott
4508c2b01b GCC 4.0 (Apple 4059) is a little bit pickier than 3.3.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-23 05:51:15 +00:00
Vadim Zeitlin
0d97c09023 added orient parameter to wxMDIParentFrame::Tile()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-21 12:27:49 +00:00
Vadim Zeitlin
a6f96659c3 compilation fix after last commit (missing semicolon added)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-20 11:01:08 +00:00
Vadim Zeitlin
294ea16de3 implemented wxMenuBar ctor taking array of menus/titles for all ports; added optional flags argument to it (patch 1162726)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-17 23:45:24 +00:00
Vadim Zeitlin
1de1196ab3 gave default value of wxID_ANY to id parameter of wxStaticLine ctor as nobody uses anything else for it anyhow
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-11 02:13:30 +00:00
Vadim Zeitlin
5dd070c25b extracted platform-specific code to determine static box borders to wxStaticBox::GetBordersForSizer()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-07 23:37:15 +00:00
Włodzimierz Skiba
789f679516 Linup API of wxRadioBox::Show on all ports. Move wxRadioBox::IsValid from wxUniversal to base class (+ GTK which do not use base class) and use it where applicable. Minor source cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-23 16:39:25 +00:00
Włodzimierz Skiba
1a87edf286 Consistent wxWindow::Enable with wxRadioBox::Enable for control and its items. wxRadioBox of PalmOS. Little source cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-21 21:02:41 +00:00
Ryan Norton
8f248607e5 ComboBox for cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-17 04:45:13 +00:00
Vadim Zeitlin
c6179a847d 1. added SetSelection() to wxItemContainer and removed its declarations
from derived classes
2. made wxItemContainer::Select() non virtual: it simply calls SetSelection()
3. renamed wxListBox::SetSelection(n, select) to DoSetSelection() for all
   ports and defined non virtual SetSelection() overloads in the base class
   to avoid virtual functions hiding


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-13 17:08:27 +00:00
Vadim Zeitlin
64fa6f167e removed multiple duplicate copies (with subtly different behaviour) of SetStringSelection(); left only one of them in wxItemContainer (and another one in wxRadioBoxBase, to be removed)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-13 16:29:31 +00:00
Ryan Norton
2fcd7f64a5 cocoa wxTimer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-04 17:21:28 +00:00
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