]> git.saurik.com Git - wxWidgets.git/commitdiff
added and documented wxWindow::SetFocusFromKbd
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 21 Apr 2002 00:31:35 +0000 (00:31 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 21 Apr 2002 00:31:35 +0000 (00:31 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/window.tex
include/wx/window.h

index 4294d874f6d457dcad7905d8f0f845ea768dc217..ef0b625cdbedff19ca79ba0f74a4d9a20966972f 100644 (file)
@@ -2070,6 +2070,19 @@ default)}
 
 This sets the window to receive keyboard input.
 
+\wxheading{See also}
+
+\helpref{wxFocusEvent}{wxfocusevent}
+
+\membersection{wxWindow::SetFocusFromKbd}\label{wxwindowsetfocusfromkbd}
+
+\func{virtual void}{SetFocusFromKbd}{\void}
+
+This function is called by wxWindows keyboard navigation code when the user
+gives the focus to this window from keyboard (e.g. using {\tt TAB} key).
+By default this method simply calls \helpref{SetFocus}{wxwindowsetfocus} but
+can be overridden to do something in addition to this in the derived classes.
+
 \membersection{wxWindow::SetFont}\label{wxwindowsetfont}
 
 \func{void}{SetFont}{\param{const wxFont\& }{font}}
index 86a38edd76de32e6bf565e9f4372f4d2d48a39d1..94f9919e5da568833bd4c5ca9ab4e3072281ac8c 100644 (file)
@@ -33,8 +33,8 @@
 #include "wx/validate.h"        // for wxDefaultValidator (always include it)
 
 #if wxUSE_PALETTE
-       #include "wx/dcclient.h"
-       #include "wx/palette.h"
+    #include "wx/dcclient.h"
+    #include "wx/palette.h"
 #endif // wxUSE_PALETTE
 
 #if wxUSE_ACCEL
@@ -375,6 +375,9 @@ public:
         // set focus to this window
     virtual void SetFocus() = 0;
 
+        // set focus to this window as the result of a keyboard action
+    virtual void SetFocusFromKbd() { SetFocus(); }
+
         // return the window which currently has the focus or NULL
     static wxWindow *FindFocus() /* = 0: implement in derived classes */;