Commit Graph

638 Commits

Author SHA1 Message Date
David Elliott
3869473778 Limit wxListBox best size to 100x100. Particularly important on trunk where
the best size is not cached and will thus keep telling the sizers that the
best size is the full size of the content (i.e. such that you wouldn't need
to scroll it).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-18 21:51:29 +00:00
David Elliott
ee528046a4 Ensure that the NSTableColumn width is that of its largest item to enable
horizontal scrolling in wxListBox.
Copyright 2008 Software 2000 Ltd.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-18 21:13:58 +00:00
David Elliott
e164c469a8 Fix bug where native views with the NSScrollView wrapper would have their
document size reset to the wx virtual size upon any size event.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-18 04:58:07 +00:00
David Elliott
b00bf6e49e Better listbox scrollbar behavior.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-14 23:34:48 +00:00
David Elliott
00a7dfee85 Hack: force a vertical scroller on wxListBox.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-14 22:54:20 +00:00
David Elliott
339d6db705 Ensure that the (separate on 2.8 branch) message dialog style gets set when constructing wxCocoa's message dialog.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-14 21:31:18 +00:00
David Elliott
f033c4562a Move wxWindowCocoaScrollView class into its own header.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-14 20:40:16 +00:00
David Elliott
bf064fec60 More GC fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-14 19:46:21 +00:00
David Elliott
b0788b27ae Fix (at least) slider action messages in GC mode.
Copyright 2008 Software 2000 Ltd.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51766 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-13 20:30:36 +00:00
David Elliott
cbc3b98b2b When Cocoa sends [tabView:didSelectTabViewItem:] create a page changed event
instead of a page changing event and actually send it.
Copyright 2008 Software 2000 Ltd.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-11 07:29:43 +00:00
David Elliott
08433260e8 Add wxGCSafeRetain/wxGCSafeRelease to the vast majority of wxCocoa code.
Copyright 2008 Software 2000 Ltd.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-08 00:35:39 +00:00
David Elliott
78b65191d6 Fix most of the Objective-C GC problems by using the stronger CFRetain/CFRelease in wxObjcAutoRef.
Actually use wxObjcAutoRef for the wxNSViewNotificationObserver singleton to keep it from being finalized.

Copyright 2008 Software 2000 Ltd.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-06 20:10:07 +00:00
David Elliott
7e27b3c853 Allow wxTopLevelWindowCocoa::SetDefaultItem(NULL)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-31 19:17:42 +00:00
Julian Smart
89639ecdba Corrected wxRTTI for wxNotebook so dynamic casting to wxBookCtrlBase works
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@50855 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-20 10:51:33 +00:00
David Elliott
75027d2856 Implement text update events so the spin control works better.
Copyright 2007 Software 2000 Ltd.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@50334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-30 05:08:21 +00:00
David Elliott
b6efa4b335 Fix for wxCocoaMessageDialog construction accidently using the totally wrong wxDialog constructor.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@50320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-29 07:35:45 +00:00
David Elliott
ef5fc865ba Implement wxBitmap::GetSubBitmap.
Patch authored by Software 2000 Ltd.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@50319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-29 07:28:17 +00:00
David Elliott
7acb34f44c Implement wxIcon::LoadFile by defering to wxBitmap implementation instead of creating a dummy 5x5 image.
Patch authored by Software 2000 Ltd.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@50318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-29 07:24:19 +00:00
David Elliott
177af5232f Need to initialize m_message and m_caption on 2.8 branch.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49770 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-09 19:10:04 +00:00
David Elliott
b060a142a6 Add RCS-ID and normalize whitespace
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-09 18:56:31 +00:00
David Elliott
0cfe8dc0fa Reconcile 2.8/trunk wxMessageDialog differences.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49766 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-09 18:48:59 +00:00
David Elliott
a2fa59b890 Merge new wxCocoaMessageDialog from trunk.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-09 18:32:38 +00:00
David Elliott
a2ca9e95f1 Fix mouse coordinates in scrolled views to be those that wxWidgets expects.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49574 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-01 06:06:07 +00:00
David Elliott
a55c88bd35 Implement scrolling like wxWindow expects. That is, scrollbars send an event
which the application processes to scroll the window the desired amount rather
than letting the toolkit do it.
There's still a lot more to go w.r.t. coordinate system transformations.
Copyright 2007 Software 2000 Ltd.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49573 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-01 04:25:25 +00:00
David Elliott
596963d4b6 Look for and remove any "-NSKey" "value" types of options from argv just like
the -psn_XXXX option is removed.  This allows Cocoa debug options like
-NSShowAllViews YES to be used as with any other Cocoa program.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-25 18:01:36 +00:00
David Elliott
eb0bfa0d51 Improve behavior of menubar switching when windows are activated.
Specifically, if a non-wx (e.g. internal Cocoa) window becomes key but a
wx window remains main, be sure to use the wx window's menubar rather
than swapping it out for the menubar we show when no wx window
is active.  Fixes Leopard issue.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-19 05:39:18 +00:00
David Elliott
5e093a9bb5 Add ProcessPendingEvents to wxApp::Yield which makes the code almost identical
to wxMSW's implementation save for using Cocoa instead of MSW.
Add a wxAutoNSAutoreleasePool around wxApp::WakeUpIdle so that calling it from
a thread does not leak the NSEvent.
Add several hundred lines of comments explaining the unique method that
wxCocoa uses to hook the underlying event loop and run loop so that wxCocoa
is able to provide things like wx idle events.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-19 02:13:13 +00:00
David Elliott
df13d77add Revert part of 49140 on the 2.8 branch making it continue to use
wxNonControlNSControl where WXNSView would do except that on the 2.8
branch I use a hack to stuff the control label in there since
2.8 has no m_labelOrig field in wxControlBase.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-18 08:30:39 +00:00
David Elliott
0d220868d4 Merge 49213/49214 from trunk. Working wxFont implementation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49216 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-18 08:23:05 +00:00
David Elliott
4ec06c2eed Add const_cast and explain why it's needed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49206 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-17 22:07:21 +00:00
David Elliott
e4d2c5d6fd Don't force the child's m_isShown state to match that of the parent in CocoaAddChild.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49153 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-14 04:44:54 +00:00
David Elliott
f11da5baf1 Implement creation of wxFont from wxNativeFontInfo.
Implement all of the getters to return the fields from the wxNativeFontInfo
contained in the wxFontRefData.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-13 08:47:38 +00:00
David Elliott
065fe5b7e2 Replace most of the fields in wxFontRefData with one wxNativeFontInfo.
Done on both trunk and 2.8.  Because the data members line up perfectly
and because I did not add nor remove any methods the ABI is (surprisingly)
not effected by this change.
The GetNativeFontInfo call now works.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-13 08:30:59 +00:00
David Elliott
605d362b4f Move wxCocoa's wxFontRefData from the header to the implementation file.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49144 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-13 07:18:04 +00:00
David Elliott
a5e02a1fae Rename src/cocoa/font.cpp to font.mm in both trunk and 2.8 branch.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-13 06:58:26 +00:00
David Elliott
8392d7bdf7 Use WXNSView just like wxWindow does when creating a wxControl. There are
already wxControl subclasses such as wxStaticBox not using primary views which
derive from NSControl so wxControl has to support this already.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-12 20:27:02 +00:00
David Elliott
a43a0ae686 Implement wxWindow::GetTextExtent to use wxDC to at least return something
reasonable rather than leaving uninitialized garbage values unchanged.

Fix wxWindow::DoSetVirtualSize so that the underlying Cocoa view always
takes up at least as much area as its enclosing clip view.  In particular,
wxDefaultCoord was not being handled, resulting in -1 size components.

Together, these make the generic wxListCtrl mostly usable.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49137 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-12 19:17:45 +00:00
David Elliott
8275efea98 Instantiate NSSecureTextField instead of NSTextField when wxTE_PASSWORD is specified.
Copyright 2007 Software 2000 Ltd.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-17 16:43:30 +00:00
David Elliott
d230db40d0 Merged 48589 from trunk:
Make a slider control created with a particular size/position adjust itself to the only size that works and adjust the positioning accordingly.
Implement the wxSL_AUTOTICKS style.
Patch from Mark Oxenham.  Copyright 2007 Software 2000 Ltd.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-06 16:47:01 +00:00
David Elliott
7748a0b287 Merged 47941 from trunk:
Implement wxRadioButton Get/SetLabel methods.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-03 18:16:03 +00:00
David Elliott
aadb49f665 Implement wxButton::SetDefault to call SetDefaultItem on the top-level window.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48529 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-03 17:17:35 +00:00
David Elliott
a492cbb83a Merge 48438 from trunk:
wxTextCtrl: Implement alignment flags, editable (read only) status, and GetLastPosition.
Patch from Mark Oxenham. Copyright 2007 Software 2000 Ltd.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-28 21:49:40 +00:00
David Elliott
79176a4aa1 Fix wxCocoa's wxLaunchDefaultBrowser in the 2.8 branch.
Roughly equivalent to trunk 45892 (NOTE: CVS)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-19 19:22:09 +00:00
David Elliott
24da507dbe Merged 48171 from trunk: Make SetCursor work.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-19 04:01:34 +00:00
David Elliott
7f3f8ee6ac Merged 48150 and 48169 from trunk:
Improve the tracing of the tracking rect manager and mouse movement synthesizer.
Fix a number of problems with tracking rectangles by avoiding rebuilding them when unnecessary.
Copyright 2007 Software 2000 Ltd.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-19 03:37:08 +00:00
David Elliott
acc7223944 Merged 48131 from trunk:
Use one run-loop observer for all synthesis of mouse moved events instead of a separate observer for each view.
Actually check the last mouse position and don't send synthesized events if the mouse hasn't moved.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48133 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-16 17:58:41 +00:00
David Elliott
d50b18a354 Use the new wxUSE_ABI_INCOMPATIBLE_FEATURES to enable enhancements for wxCocoa builds.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-15 17:58:46 +00:00
David Elliott
83b3034b24 Merged 48106 from trunk:
Add support for uniquifying to all wxCocoa Objective-C classes.
Patch from Mark Taylor.
Copyright 2007 Software 2000 Ltd.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-15 16:12:45 +00:00
David Elliott
1346171e5f Merge in the recent wxSlider work from svn trunk (various commits). This patch keeps ABI compatibility but won't yet
generate events caused by mouse movement (next commit will do that ABI compatibly).
Copyright 2007 Software 2000 Ltd.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48080 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-15 04:42:44 +00:00
David Elliott
438ed1ab0f Merge 48074:
Fix the top-level window client size setting code such that the window position does not change as seen by wxWidgets.
Copyright 2007 Software 2000 Ltd.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48075 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-14 22:39:46 +00:00