Commit Graph

38 Commits

Author SHA1 Message Date
Vadim Zeitlin
b46b1d59d6 implement event loop for console applications (heavily modified patch 1715735)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-14 23:43:39 +00:00
Mattia Barbon
105fbe1ffa Rework wxMotif font/color inheritance so it works
like in the other ports.  Avoid setting foreground/background
color for windows and let the toolkit use the natural color.
As an intermediate step font is still explicitly set.

  Handle the cases where m_foregroundColour, m_backgroundColour ir m_font
are not initialized.

  Set default (overridable) X resources to emulate the old look.

  Unify wxMOTIF_NEW_FONT_HANDLING with wxMOTIF_USE_RENDER_TABLE.

  Minor unrelated (sizing) fixes to wxCheckListBox, wxStaticText, wxTextCtrl.

  Tagged with MOTIF_BEFORE_COLOUR_FONT_INHERITANCE before the changes.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-07 21:18:33 +00:00
Vadim Zeitlin
551fe9528a added wxXmString ctor from wxCStrData to fix compilation errors after c_str() changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-19 00:53:06 +00:00
Vadim Zeitlin
2a015b8917 replaced c_str() with mb_str() to fix compilation after c_str() changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-18 23:52:35 +00:00
Włodzimierz Skiba
925f774066 Minor header cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-25 14:31:55 +00:00
Vadim Zeitlin
f516d98637 create stock GDI objects on demand; use const with GDI objects appropriately (patch 1445355)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-16 22:18:29 +00:00
Michael Wetherell
2e2a55b22e Compile fixes for the const patch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-25 12:53:28 +00:00
Vadim Zeitlin
f1db433a3b added wxMOTIF_STR() macro casting away string literal constness for use with Motif functions taking char *; use it when needed to suppress warnings about string literals being treated as non-const
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-13 16:49:07 +00:00
Mattia Barbon
996994c714 Allow displaying Japanese character with wxMotif/ANSI under a
Japanese EUC-JP locale:

- add a #define (wxMOTIF_NEW_FONT_HANDLING) defaulting to
  off
- factor the code for getting text extents in a central
  wxGetTextExtent function
- when the new font handling is enabled load a fontset instead of
  a single font. For non-Japanese locales this should load a fontset
  containing a single font.
- on a Japanese locale set the default point size to 15: the Japanese
  fonts I have are much more readable like this.
- do not set the wordwrap property for multiline wxTextCtrl with
  OpenMotif 2.1, otherwise it crashes when text is added


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-07-31 09:42:16 +00:00
Mattia Barbon
96be256b3e Replaced TRUE and FALSE with true and false
(or True and False when calling Motif APIs).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-06 17:38:33 +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
Mattia Barbon
2a23a89dec Removed duplicated code.
wxTranslateXXXEvent must not alter the XEvent.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-03 21:03:13 +00:00
Mattia Barbon
6769d0cbf3 Factored out some common code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-05-12 20:04:08 +00:00
Mattia Barbon
eb6fa4b425 Changed the way ApplicationShells are used: now wxMotif
creates one ApplicationShell per display, and makes top
level windows popup childs of the ApplicationShell.
  Removed a couple of unused variables from wxApp.
  Replaced some calls to wxGetDisplay with XtDisplay(widget)
or event.xany.display, and some others with wxGlobalDisplay
(the latter changes are just eyecandy).
  Used wxFlushEvents where appropriate.
  Fixed (hopefully) wxFindAcceleratorText and wxFindAccelerator;
for now the new version is still disabled, awaiting further testing.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-05-04 17:40:46 +00:00
Mattia Barbon
aae0472bf3 Use the wxBitmap implementation from wxX11
in wxMotif; solves various bugs related to wxMask
handling (and effectively adds a lot of wxMask
functionality previously missing).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-09 16:44:27 +00:00
Mattia Barbon
d8d1818419 SetSelection must not send an event. Fixed an off
by one index, and a crash (probably a Motif bug).
  Improved wxSpinButton appearance.
  Fixed some build warnings here and there in the samples,
removed use of deprecated wxList methods in prntdlgg.cpp, fixed
aot-of-range ID in tipdlg.cpp, fixed some errors detected by
valgrind.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-26 22:20:59 +00:00
Mattia Barbon
3e2d47e1a9 Added helper functions for string -> XmString conversion.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-10 21:40:53 +00:00
Mattia Barbon
da494b405d Added new __WXMOTIF20__ macro, which is true if the Motif version
is 2.0 or higher.
  Now Motif 2.0 or better (but not Lesstif) uses XmRenderTable instead
of the deprecated XmFontList. This allows underlined text in controls.
  Miscellaneous cleanup; used wxXmString in some more places.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-05 20:15:35 +00:00
Mattia Barbon
483561c568 Refactored wxStaticBox, and changed wxStaticBox and wxRadioBox border
style from sunken to the default Motif style.
  Added some convenience macros for checking Motif/Lesstif version.
  Fixed the bug that caused wxStaticBox size to change when label text
was changed.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19427 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-02 20:08:45 +00:00
Mattia Barbon
e1aae52885 Implemented DoGetBestSize for wxListBox, (native) wxComboBox and
wxTextCtrl, and used it when wxSize(-1, -1) is passed to Create, to set
the initial size.
  Added wxDoChangeFont and wxXmStringToString helper functions, removed
the use of m_stringList in native wxComboBox, removed some duplicated code
in wxWindow.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-02-23 20:33:43 +00:00
Mattia Barbon
9b1bd0c6e7 Applied patch [ 679397 ] remove GPL code from motif build
from Ian Brown, with some modifications; this patch replaces the (GPL)
Motif ComboBox with an implementation based on the native (for Motif 2.0)
ComboBox. The old ComboBox is still used as a fallback for older Motif
versions. My modifications include some method's implementation and
some workarounds for LessTif.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-02-04 21:09:03 +00:00
Mattia Barbon
7e1bcfa80e Implemented wxEventLoop for wxMotif, and used it in wxDialog::ShowModal,
wxWindow::DoPopupMenu and for the application main loop.
  Implemented wxWakeUpIdle.
  Fixed crash when a popup menu entry is used to close/destroy the parent
window of the menu.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19078 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-02-02 15:48:50 +00:00
Julian Smart
3a0b23eb74 Added some XSyncs to help size calculations, but positioning
dialog remains a mystery


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-02-14 18:06:50 +00:00
Julian Smart
7266b67235 Now compiling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-02-08 17:44:23 +00:00
Julian Smart
83df96d63a Reformatted Motif headers; added __WXX11__ symbol support to common headers;
added place-holding src/x11 and include/wx/x11 files.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-02-05 16:34:33 +00:00
Vadim Zeitlin
d391a34510 renamed gsockmot.cpp to *.c
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3778 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-01 13:53:26 +00:00
Vadim Zeitlin
31528cd3ca 1. more wxMotif fixes
2. wxGetNumberFromUser added
3. more compilation fixes when compiling without sockets


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-23 21:03:02 +00:00
Vadim Zeitlin
ee31c392ac 1. Assorted Motif fixes
a) tear off menus
 b) native dialogs
 c) crash in ~wxWindow fixed
 d) compilation and linking fixes
2. test code removed from minimal sample, text one compiles without clipboard
3. wxAppBase/wxApp small fixes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-21 16:10:18 +00:00
Vadim Zeitlin
34636400a0 1. wxWindow::IsTopLevel() added and documented
2. wxDynamicClass() added and documented
3. first Motif fixes (doesn't compile yet)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-07 18:26:42 +00:00
Julian Smart
2e35f56f6d Fixed wxMotif's wxExecute again, added OnPaint capability to wxFrame,
removed old focus code from wxGTK's ~wxWindow


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-02-18 22:51:03 +00:00
Julian Smart
94b49b9303 In DialogEd, changed Close to Destroy to make it shut down properly.
Various Motif fixes incl. fixing window colours, menu fonts/colours, dialog box


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-12-18 14:40:38 +00:00
Julian Smart
0d57be4594 More Motif stuff incl. beginnings of wxToolBar
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@895 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-10-21 21:43:20 +00:00
Julian Smart
a4294b7832 Motif additions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-10-18 22:31:48 +00:00
Julian Smart
dfc5454127 More Motif stuff
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-09-20 20:59:30 +00:00
Julian Smart
02e8b2f9fb More Motif stuff, minor stubs correction
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-09-20 07:35:20 +00:00
Julian Smart
50414e24a7 Some more wxMotif stuff: menus
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-09-18 21:33:46 +00:00
Julian Smart
9b6dbb0974 Added Motif files.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-09-18 10:19:10 +00:00