| Version: 3.0.1

- Main Page
- Related Pages
- Categories
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | List of all members
wxNavigationEnabled< W > Class Template Reference

`#include <wx/containr.h>`

Inheritance diagram for wxNavigationEnabled< W >:
[legend]

## Detailed Description

### template<class W>
class wxNavigationEnabled< W >

A helper class implementing TAB navigation among the window children.

This class contains the functionality needed to correctly implement TAB navigation among the children of the window. Its exact contents is not important and is intentionally not documented as the only way to use this class is to inherit from it instead of inheriting from the usual base class directly. For example, if some class needs to inherit from wxControl but contains multiple sub-windows and needs to support keyboard navigation, it is enough to declare it in the following way:

class MyControlWithSubChildren :
public wxNavigationEnabled<wxControl>
{
public:
// Default constructor is implemented in the same way as always.
MyControlWithSubChildren() { }
// Non-default constructor can't use wxControl ctor any more as
// wxControl is not its direct base class, but it can use Create().
MyControlWithSubChildren(wxWindow *parent, wxWindowID winid)
{
wxControl::Create(parent, winid);
// More creation code...
}
// Everything else as usual ...
};

##

Library: wxCore

Since
  2.9.3

## Public Types

typedef W | BaseWindowClass
| The name of the real base window class that this class derives from.

## Public Member Functions

| wxNavigationEnabled ()
| Default constructor.

## Member Typedef Documentation

template<class W >

typedef W wxNavigationEnabled< W >::BaseWindowClass

The name of the real base window class that this class derives from.

## Constructor & Destructor Documentation

template<class W >

wxNavigationEnabled< W >::wxNavigationEnabled | ( |  | ) |

Default constructor.

This class provides only the default constructor as it's not possible, in general, to provide all the constructors of the real base class BaseWindowClass.

This is however not usually a problem for wxWindow-derived classes as, by convention, they always define a Create() method such that calling it on an object initialized using the default constructor is equivalent to using a non-default constructor directly. So the classes inheriting from wxNavigationEnabled<W> should simply call W::Create() in their constructors.