Commit Graph

528 Commits

Author SHA1 Message Date
Robin Dunn
fe161a2685 Controls will readjust their size and minsize when SetLabel or SetFont
are called.  Fixed up wxStaticText to blend the wxST_NO_AUTOSIZE with
this new functionality.  Made SetBestSize public under the
SetBestFittingSize name.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-19 01:35:10 +00:00
Robin Dunn
f8e045e24b Give wxWindowGTK::ApplyWidgetStyle an implementation too so
non-control windows can also change colours, etc.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-18 17:30:32 +00:00
Václav Slavík
5edef14ec8 reset fg/bg colour and font to default if set to wxNullColour/Font
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-18 08:02:01 +00:00
Robin Dunn
44dfb5ce92 Set/Reset ThemeEnabled when changing the fore/background colours.
Using wxNullColour will reset to defaults.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-17 21:31:13 +00:00
Václav Slavík
e236828da1 it's OK to set background,foreground colour even with theming now
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27854 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-17 17:01:51 +00:00
Julian Smart
8700aedc16 Typo correction
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27817 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-15 22:30:08 +00:00
Julian Smart
eedc82f4e9 Navigate corrections
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-15 21:55:18 +00:00
Julian Smart
f5f3247dcc Tests for wxTE_PROCESS_TAB again in line with other ports
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-15 14:49:54 +00:00
Václav Slavík
f40fdaa339 fixed GTK styles handling:
1. don't modify the style unless something changed
2. use gtk_widget_modify_style instead of gtk_widget_set_style, the latter is not recommended by GTK+ developers


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27784 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-14 17:34:00 +00:00
Václav Slavík
90b85bfcde fixed background rendering if GetThemeEnabled()=true with GTK2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-13 13:09:16 +00:00
Václav Slavík
50f00d0c99 use simple template instead of macro, it's easier to debug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27613 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-04 10:03:29 +00:00
Václav Slavík
971562cb51 use current mouse position as default position in wxWindow::PopupMenu (works better in wxGTK and is what you need in majority of cases)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-03 14:05:30 +00:00
Václav Slavík
39b44a399f don't use global variables if GTK provides mechanism to pass arguments to callback function
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-30 12:50:40 +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
Robin Dunn
a72f1d162b Patch [ 952969 ] Parentless windows forced to center of screen
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-13 16:05:38 +00:00
Vadim Zeitlin
1cd3409d5e fixed assert failure for a window which doesn't have a set background colour
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27062 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-02 13:10:43 +00:00
Robin Dunn
82b978d70d Reverted last change
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-01 22:46:38 +00:00
Robin Dunn
abdb7725e1 In wxGTK2 the wxMessageDialog is not a real wxDialog so its m_widget
will always be NULL there will be a wxCHECK asserts triggered whenever
calling base class methods that are valid calls (or just ignored) on
other wx ports.  Added a set of macros to be used to test m_widget
that will bypass the wxFAIL if the window is a wxMessageDialog.  This
will silence those asserts if the window is a wxMessageDialog and will
let the method doing the check just be ignored in that case.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-01 21:29:35 +00:00
Robin Dunn
57fbd4359a SetFont may temporarily rset the background to wxNullColour before
calling ApplyWidgetStyle, so make sure we don't use an invalid colour.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-04-22 22:04:24 +00:00
Vadim Zeitlin
c7e111cd98 wxGTK became a little too eager in using the best size after my change in 1.453; only use it if width or height are not specified
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-04-01 13:32:16 +00:00
Vadim Zeitlin
cc402e6431 use GetFont() instead of (possibly not initialized) m_font in GetCharWidth/Height()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-04-01 13:09:26 +00:00
Vadim Zeitlin
a433fbd51d show window from PostCreation() (which is called for the derived classes as well) instead of Create() (which is not)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-04-01 13:08:24 +00:00
Vadim Zeitlin
40452e0583 only use font/colours in SetWidgetStyle() if they're set
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26544 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-04-01 12:45:24 +00:00
Vadim Zeitlin
c5fc899bf2 really show the window after creation (calling Show(TRUE) doesn't do it any more)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-04-01 12:40:04 +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
Robert Roebling
aa154cb157 Fix conversion error in tooltips.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-20 12:24:16 +00:00
Robert Roebling
58d185f709 Applied wheel mouse patch.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-17 09:42:04 +00:00
Robin Dunn
a7c26d107d Changed WidthDefault() and HeightDefault() to use 400,250. If there
is a better set of default values feel free to change it, just don't
make them too small for TLWs.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-05 21:04:10 +00:00
Julian Smart
f9d5648a95 Fix for compilation under GTK+ 2.0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-02-22 22:04:22 +00:00
Vadim Zeitlin
15475ced88 suppress triple clicks generation completely for GTK2 as it makes long click series generate exactly the same events as under other ports (patch 895564)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25770 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-02-12 16:41:59 +00:00
Vadim Zeitlin
b1f50e652c restored defaults in switchs removed in the last commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-02-10 19:30:20 +00:00
Vadim Zeitlin
f3f0d961af don't just drop click events resulting from triple clicks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-02-09 23:28:13 +00:00
Julian Smart
557c9f5b0a Applied patch [ 829367 ] Correctly handle mouse wheel for X Windows GTK 2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-12-11 10:35:17 +00:00
Julian Smart
95c430aa2e Aplied patch [ 816113 ] Inconsistent GetCharWidth over platforms
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-12-11 09:05:48 +00:00
Julian Smart
133fb2a3a0 Applied patch [ 816021 ] SetFont without m_widget
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-12-11 08:06:08 +00:00
Vadim Zeitlin
727953356d removed calls to wxWindowBase::InitBase(), it is called from the ctor anyhow (and so was called twice)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-10-30 23:08:39 +00:00
Vadim Zeitlin
e441e1f4e8 made wxNO_FULL_REPAINT_ON_RESIZE default, added wxFULL_REPAINT_ON_RESIZE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23871 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-24 00:26:40 +00:00
Robin Dunn
443c834d8d Check wxSIZE_ALLOW_MINUS_ONE for x and y too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23730 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-19 22:32:24 +00:00
Robert Roebling
9abbd4a017 Left in some debug code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-16 21:58:02 +00:00
Vadim Zeitlin
8e35ab96f6 call RemoveChild() in ~wxWindowBase instead of doing it in each ~wxWindow for each port
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-15 11:45:08 +00:00
Robert Roebling
8b8a8e0e5f Filter out triple click events entirely.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-11 18:39:15 +00:00
Robert Roebling
a1696b86f8 Upported a number of patches to HEAD.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23452 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-09 18:04:57 +00:00
Vadim Zeitlin
596f1d1160 renamed wxWindow::Clear() to ClearBackground() for wxGTK as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-08-13 16:47:43 +00:00
Václav Slavík
14f355c2b5 added support for gcc precompiled headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-08-09 12:46:53 +00:00
Vadim Zeitlin
34adc95440 reverted GTK 1.x part of the last patch, it breaks popup menus sometimes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-30 00:15:26 +00:00
Robert Roebling
3479189669 Applied pop menu patch.
Applied font util patch for better font matching under GTK 1.2


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22229 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-22 09:01:49 +00:00
Vadim Zeitlin
e1f448eeef corrected bug with alignment of static labels with GTK 2 (replaces patch 760066; closes bug 759375)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-10 22:32:52 +00:00
Mattia Barbon
222ed1d678 STL-ification patch for wxMSW and wxGTK.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-10 19:55:12 +00:00
Julian Smart
e39af974ef - Moved wxApp::SendIdleEvents and wxApp::ProcessIdle into common code.
- wxWindow::OnInternalIdle is now used in all ports, and ensures that
  user OnIdle events do not interfere with crucial internal processing.
- wxWindow::UpdateWindowUI is now a documented function that
  sends wxUpdateUIEvents, and can be overridden. It has a helper function
  DoUpdateWindowUI for taking appropriate wxUpdateUIEvent action.
- Added functions to wxUpdateUIEvent: Set/GetMode, Set/GetUpdateInterval,
  CanUpdate, to assist with optimising update event frequency.
- Added functions to wxIdleEvent: Set/GetMode, CanSend, to
  determine whether a window should receive idle events.
- Added wxWS_EX_PROCESS_IDLE, wxWS_EX_PROCESS_UI_UPDATES window
  styles for use with conservative idle and update event modes.
- wxMSW and wxGTK now send menu update events only when a menu is
  about to be used.
- Added WM_INITMENU processing instead of WM_ENTERMENULOOP, or
  accelerators don't always get called since menu items may still
  be disabled.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-09 10:15:21 +00:00