1. panels pass focus to the next item in parent panel
2. warnings removed from iniconf.cpp and it's removed for Win32 compilation 3. wxWindow::PopupMenu(wxPoint) added, documented 4. Docs for wxTextCtrl explicitly mention that EVT_TEXT is triggered by programmatic updates too git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -173,7 +173,7 @@ gdiobj.cpp M
|
||||
helpwin.cpp M
|
||||
icon.cpp M
|
||||
imaglist.cpp M 32
|
||||
iniconf.cpp M
|
||||
iniconf.cpp M 16
|
||||
joystick.cpp M
|
||||
listbox.cpp M
|
||||
listctrl.cpp M 32
|
||||
|
@@ -66,7 +66,9 @@ functions that take a \helpref{wxCommandEvent}{wxcommandevent} argument.
|
||||
\twocolwidtha{7cm}%
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf EVT\_TEXT(id, func)}}{Respond to a wxEVT\_COMMAND\_TEXT\_UPDATED event,
|
||||
generated when the text changes.}
|
||||
generated when the text changes. Notice that this event will always be sent
|
||||
when the text controls contents changes - whether this is due to user input or
|
||||
comes from the program itself (for example, if SetValue() is called)}
|
||||
\twocolitem{{\bf EVT\_TEXT\_ENTER(id, func)}}{Respond to a wxEVT\_COMMAND\_TEXT\_ENTER event,
|
||||
generated when enter is pressed in a single-line text control.}
|
||||
\end{twocollist}%
|
||||
|
@@ -1492,18 +1492,21 @@ default value is FALSE.}
|
||||
|
||||
\membersection{wxWindow::PopupMenu}\label{wxwindowpopupmenu}
|
||||
|
||||
\func{virtual bool}{PopupMenu}{\param{wxMenu* }{menu}, \param{int }{x}, \param{int }{y}}
|
||||
\func{bool}{PopupMenu}{\param{wxMenu* }{menu}, \param{const wxPoint& }{pos}}
|
||||
|
||||
\func{bool}{PopupMenu}{\param{wxMenu* }{menu}, \param{int }{x}, \param{int }{y}}
|
||||
|
||||
Pops up the given menu at the specified coordinates, relative to this
|
||||
window, and returns control when the user has dismissed the menu. If a
|
||||
menu item is selected, the callback defined for the menu is called with
|
||||
wxMenu and wxCommandEvent reference arguments. The callback should access
|
||||
the commandInt member of the event to check the selected menu identifier.
|
||||
menu item is selected, the corresponding menu event is generated and will be
|
||||
processed as usually.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{menu}{Menu to pop up.}
|
||||
|
||||
\docparam{pos}{The position where the menu will appear.}
|
||||
|
||||
\docparam{x}{Required x position for the menu to appear.}
|
||||
|
||||
\docparam{y}{Required y position for the menu to appear.}
|
||||
|
@@ -629,7 +629,7 @@ class WXDLLEXPORT wxListCtrl: public wxControl
|
||||
{ return m_mainWin ? m_mainWin->GetBackgroundColour() : wxColour(); }
|
||||
wxColour GetForegroundColour() const
|
||||
{ return m_mainWin ? m_mainWin->GetForegroundColour() : wxColour(); }
|
||||
bool PopupMenu( wxMenu *menu, int x, int y )
|
||||
bool DoPopupMenu( wxMenu *menu, int x, int y )
|
||||
{ return m_mainWin->PopupMenu( menu, x, y ); }
|
||||
void SetFocus()
|
||||
{ m_mainWin->SetFocus(); }
|
||||
|
@@ -86,7 +86,7 @@ public:
|
||||
const wxFont *theFont = (const wxFont *) NULL)
|
||||
const;
|
||||
|
||||
virtual bool PopupMenu( wxMenu *menu, int x, int y );
|
||||
virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
|
||||
|
||||
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
|
||||
int range, bool refresh = TRUE );
|
||||
|
@@ -86,7 +86,7 @@ public:
|
||||
const wxFont *theFont = (const wxFont *) NULL)
|
||||
const;
|
||||
|
||||
virtual bool PopupMenu( wxMenu *menu, int x, int y );
|
||||
virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
|
||||
|
||||
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
|
||||
int range, bool refresh = TRUE );
|
||||
|
@@ -110,7 +110,7 @@ public:
|
||||
const wxFont *theFont = (const wxFont *) NULL)
|
||||
const;
|
||||
|
||||
virtual bool PopupMenu( wxMenu *menu, int x, int y );
|
||||
virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
|
||||
|
||||
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
|
||||
int range, bool refresh = TRUE );
|
||||
|
@@ -531,7 +531,10 @@ public:
|
||||
|
||||
void UpdateWindowUI();
|
||||
|
||||
virtual bool PopupMenu( wxMenu *menu, int x, int y ) = 0;
|
||||
bool PopupMenu( wxMenu *menu, const wxPoint& pos )
|
||||
{ return DoPopupMenu(menu, pos.x, pos.y); }
|
||||
bool PopupMenu( wxMenu *menu, int x, int y )
|
||||
{ return DoPopupMenu(menu, x, y); }
|
||||
|
||||
// scrollbars
|
||||
// ----------
|
||||
@@ -772,6 +775,8 @@ protected:
|
||||
virtual void DoSetToolTip( wxToolTip *tip );
|
||||
#endif // wxUSE_TOOLTIPS
|
||||
|
||||
virtual bool DoPopupMenu( wxMenu *menu, int x, int y ) = 0;
|
||||
|
||||
private:
|
||||
// contains the last id generated by NewControlId
|
||||
static int ms_lastControlId;
|
||||
|
@@ -109,16 +109,34 @@ void wxPanel::OnNavigationKey( wxNavigationKeyEvent& event )
|
||||
}
|
||||
|
||||
wxWindowList::Node *start_node = GetChildren().Find( winFocus );
|
||||
if (!start_node)
|
||||
if ( !start_node )
|
||||
start_node = GetChildren().Find( m_winLastFocused );
|
||||
if ( !start_node )
|
||||
start_node = GetChildren().GetFirst();
|
||||
|
||||
wxWindowList::Node *node = event.GetDirection() ? start_node->GetNext()
|
||||
: start_node->GetPrevious();
|
||||
|
||||
while (node != start_node)
|
||||
while ( node != start_node )
|
||||
{
|
||||
if (!node)
|
||||
if ( !node )
|
||||
{
|
||||
// check if our (may be grand) parent is another panel: if this is
|
||||
// the case, they will know what to do with this navigation key and
|
||||
// so give them the chance to process it instead of looping inside
|
||||
// this panel (normally, the focus will go to the next/previous
|
||||
// item after this panel in the parent panel)
|
||||
for ( wxWindow *p = GetParent(); p; p = p->GetParent() )
|
||||
{
|
||||
if ( wxDynamicCast(p, wxPanel) )
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// no, we are not inside another panel so process this ourself
|
||||
node = event.GetDirection() ? GetChildren().GetFirst()
|
||||
: GetChildren().GetLast();
|
||||
|
||||
@@ -127,7 +145,7 @@ void wxPanel::OnNavigationKey( wxNavigationKeyEvent& event )
|
||||
|
||||
wxWindow *child = node->GetData();
|
||||
|
||||
if (child->AcceptsFocus())
|
||||
if ( child->AcceptsFocus() )
|
||||
{
|
||||
// ok, event processed
|
||||
child->SetFocus();
|
||||
|
@@ -2869,7 +2869,7 @@ static void pop_pos_callback( GtkMenu * WXUNUSED(menu),
|
||||
*y = gs_pop_y;
|
||||
}
|
||||
|
||||
bool wxWindow::PopupMenu( wxMenu *menu, int x, int y )
|
||||
bool wxWindow::DoPopupMenu( wxMenu *menu, int x, int y )
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, FALSE, _T("invalid window") );
|
||||
|
||||
|
@@ -2869,7 +2869,7 @@ static void pop_pos_callback( GtkMenu * WXUNUSED(menu),
|
||||
*y = gs_pop_y;
|
||||
}
|
||||
|
||||
bool wxWindow::PopupMenu( wxMenu *menu, int x, int y )
|
||||
bool wxWindow::DoPopupMenu( wxMenu *menu, int x, int y )
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, FALSE, _T("invalid window") );
|
||||
|
||||
|
@@ -442,9 +442,13 @@ bool wxIniConfig::DeleteAll()
|
||||
char szBuf[MAX_PATH];
|
||||
size_t nRc = GetWindowsDirectory(szBuf, WXSIZEOF(szBuf));
|
||||
if ( nRc == 0 )
|
||||
{
|
||||
wxLogLastError("GetWindowsDirectory");
|
||||
}
|
||||
else if ( nRc > WXSIZEOF(szBuf) )
|
||||
{
|
||||
wxFAIL_MSG("buffer is too small for Windows directory.");
|
||||
}
|
||||
|
||||
wxString strFile = szBuf;
|
||||
strFile << '\\' << m_strLocalFilename;
|
||||
|
@@ -1422,7 +1422,7 @@ void wxWindow::GetCaretPos(int *x, int *y) const
|
||||
// popup menu
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
bool wxWindow::PopupMenu(wxMenu *menu, int x, int y)
|
||||
bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y)
|
||||
{
|
||||
menu->SetInvokingWindow(this);
|
||||
menu->UpdateUI();
|
||||
|
Reference in New Issue
Block a user