diff --git a/distrib/msw/mac.rsp b/distrib/msw/mac.rsp index 095432ae2e..9780ebb7bf 100644 --- a/distrib/msw/mac.rsp +++ b/distrib/msw/mac.rsp @@ -41,3 +41,5 @@ src/mac/macsock/*.lib include/wx_pb.h include/wx/mac/*.h +samples/minimal/minimal.pbproj/project.pbxproj + diff --git a/distrib/msw/msw.rsp b/distrib/msw/msw.rsp index b705079f2a..f4568c8959 100644 --- a/distrib/msw/msw.rsp +++ b/distrib/msw/msw.rsp @@ -56,6 +56,8 @@ src/common/*.rc src/msw/*.cpp src/msw/*.h src/msw/makefile.* +src/msw/makebase.b32 +src/msw/makeuniv.b32 src/msw/*.lst src/msw/*.def src/msw/*.inc diff --git a/docs/changes.txt b/docs/changes.txt index b8e47da76c..30398ec024 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -281,6 +281,8 @@ wxMSW: - don't fail to register remaining window classes if one fails to register - wxFontDialog effects only turned on if a valid colour was provided in wxFontData +- Added wxTE_LEFT, wxTE_CENTRE and wxTE_RIGHT flags for text + control alignment. wxGTK: diff --git a/docs/latex/wx/text.tex b/docs/latex/wx/text.tex index 8bc4647878..c7f58237a3 100644 --- a/docs/latex/wx/text.tex +++ b/docs/latex/wx/text.tex @@ -114,9 +114,12 @@ under Win32 only and requires wxTE\_RICH.} doesn't show the selection when it doesn't have focus - use this style to force it to always show it. It doesn't do anything under other platforms.} \twocolitem{\windowstyle{wxHSCROLL}}{A horizontal scrollbar will be created. No effect under GTK+.} +\twocolitem{\windowstyle{wxTE\_LEFT}}{The text control will be left-justified (default).} +\twocolitem{\windowstyle{wxTE\_CENTRE}}{The text control will be centre-justified.} +\twocolitem{\windowstyle{wxTE\_RIGHT}}{The text control will be right-justified.} \twocolitem{\windowstyle{wxTE\_DONTWRAP}}{Same as {\tt wxHSCROLL} style.} -\twocolitem{\windowstyle{wxTE\_LINEWRAP}}{Wrap the lines too long to be shown entirely at any position (wxUniv only currently)} -\twocolitem{\windowstyle{wxTE\_WORDWRAP}}{Wrap the lines too long to be shown entirely at word boundaries only (wxUniv only currently)} +\twocolitem{\windowstyle{wxTE\_LINEWRAP}}{Wrap the lines too long to be shown entirely at any position (wxUniv only currently).} +\twocolitem{\windowstyle{wxTE\_WORDWRAP}}{Wrap the lines too long to be shown entirely at word boundaries only (wxUniv only currently).} \end{twocollist} See also \helpref{window styles overview}{windowstyles} and diff --git a/include/wx/textctrl.h b/include/wx/textctrl.h index 61240469af..358e304958 100644 --- a/include/wx/textctrl.h +++ b/include/wx/textctrl.h @@ -58,18 +58,27 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; // wxTextCtrl style flags // ---------------------------------------------------------------------------- -// the flag bits 0x0001, 2, 4 and 8 are free but should be used only for the +// the flag bits 0x0001, and 0x0004 are free but should be used only for the // things which don't make sense for a text control used by wxTextEntryDialog // because they would otherwise conflict with wxOK, wxCANCEL, wxCENTRE + +#define wxTE_NO_VSCROLL 0x0002 +#define wxTE_AUTO_SCROLL 0x0008 + #define wxTE_READONLY 0x0010 #define wxTE_MULTILINE 0x0020 #define wxTE_PROCESS_TAB 0x0040 +// alignment flags +#define wxTE_LEFT 0x0000 // 0x0000 +#define wxTE_CENTER wxALIGN_CENTER_HORIZONTAL // 0x0100 +#define wxTE_RIGHT wxALIGN_RIGHT // 0x0200 +#define wxTE_CENTRE wxTE_CENTER + // this style means to use RICHEDIT control and does something only under wxMSW // and Win32 and is silently ignored under all other platforms #define wxTE_RICH 0x0080 -#define wxTE_NO_VSCROLL 0x0100 -#define wxTE_AUTO_SCROLL 0x0200 + #define wxTE_PROCESS_ENTER 0x0400 #define wxTE_PASSWORD 0x0800 diff --git a/samples/taskbar/tbtest.cpp b/samples/taskbar/tbtest.cpp index 8e868f2a82..99d07a61a1 100644 --- a/samples/taskbar/tbtest.cpp +++ b/samples/taskbar/tbtest.cpp @@ -20,7 +20,7 @@ #include "wx/wx.h" #endif -#include "wx/msw/taskbar.h" +#include "wx/taskbar.h" #include "tbtest.h" // Declare two frames diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 6e285fabad..882a6f60e9 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -362,6 +362,10 @@ void wxTextCtrl::AdoptAttributesFromHWND() m_windowStyle |= wxTE_READONLY; if (style & ES_WANTRETURN) m_windowStyle |= wxTE_PROCESS_ENTER; + if (style & ES_CENTER) + m_windowStyle |= wxTE_CENTRE; + if (style & ES_RIGHT) + m_windowStyle |= wxTE_RIGHT; } WXDWORD wxTextCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const @@ -410,6 +414,12 @@ WXDWORD wxTextCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const if ( style & wxTE_NOHIDESEL ) msStyle |= ES_NOHIDESEL; + if ( style & wxTE_CENTRE ) + msStyle |= ES_CENTER; + + if ( style & wxTE_RIGHT ) + msStyle |= ES_RIGHT; + return msStyle; }