9#ifndef OWL_TRANSFERBUFFER_H
10#define OWL_TRANSFERBUFFER_H
131template <
class TControlType>
141template <
class TBuffer>
160 template <
class TControlType,
class TFieldType>
173 TBuffer*
const p = 0;
174 const size_t offset =
reinterpret_cast<char*
>(&(p->*
field)) -
reinterpret_cast<char*
>(p);
186 template <
class TControlType,
class TFieldType>
195 template <
class TControlType,
class TFieldType,
class TArg1>
204 template <
class TControlType,
class TFieldType,
class TArg1,
class TArg2>
213 template <
class TControlType,
class TFieldType,
class TArg1,
class TArg2,
class TArg3>
222 template <
class TControlType,
class TFieldType,
class TArg1,
class TArg2,
class TArg3,
class TArg4>
231 template <
class TControlType,
class TFieldType,
class TArg1,
class TArg2,
class TArg3,
class TArg4,
class TArg5>
240 template <
class TControlType,
class TFieldType,
class TArg1,
class TArg2,
class TArg3,
class TArg4,
class TArg5,
class TArg6>
249 template <
class TControlType,
class TFieldType,
class TArg1,
class TArg2,
class TArg3,
class TArg4,
class TArg5,
class TArg6,
class TArg7>
252 return Bind(
field,
TTransferBufferBinder<TControlType>::Create(
field,
this,
id,
a1,
a2,
a3,
a4,
a5,
a6,
a7));
272template <
class TControlType,
class TBuffer, u
int N>
275 WARN(
c.GetTextLimit() > 0 &&
c.GetTextLimit() !=
N,
276 _T(
"Corrected text limit and field size mismatch for control #")
280 WARN(
true,
_T(
"Character array fields are deprecated for use with transfer buffers. ")
281 <<
_T(
"Use a standard string class instead for control #")
286 c.SetTransferBufferFieldType(TControlType::tbftCharArray);
293template <
class TControlType,
class TFieldType>
298 template <
class TBuffer>
305 template <
class TBuffer>
311 template <
class TBuffer,
class TArg1>
318 template <
class TBuffer,
class TArg1,
class TArg2>
325 template <
class TBuffer,
class TArg1,
class TArg2,
class TArg3>
332 template <
class TBuffer,
class TArg1,
class TArg2,
class TArg3,
class TArg4>
339 template <
class TBuffer,
class TArg1,
class TArg2,
class TArg3,
class TArg4,
class TArg5>
346 template <
class TBuffer,
class TArg1,
class TArg2,
class TArg3,
class TArg4,
class TArg5,
class TArg6>
353 template <
class TBuffer,
class TArg1,
class TArg2,
class TArg3,
class TArg4,
class TArg5,
class TArg6,
class TArg7>
370 template <
class TBuffer, u
int N>
376 template <
class TBuffer>
382 template <
class TBuffer, u
int N>
389 template <
class TBuffer>
406 template <
class TBuffer, u
int N>
412 template <
class TBuffer>
418 template <
class TBuffer, u
int N>
425 template <
class TBuffer>
530 template <
class TBuffer, u
int N>
536 template <
class TBuffer>
542 template <
class TBuffer>
548 template <
class TBuffer, u
int N>
555 template <
class TBuffer>
562 template <
class TBuffer>
Definition of class TCheckBox.
Definition of class TCheckList, an ownerdrawn listbox to select multiple items.
#define WARN(condition, message)
TCheckBox is a streamable interface class that represents a check box control.
TCheckList is an owner-drawn list box to select multiple items.
An interface object that represents a transfer buffer for a TComboBox.
ComboBoxEx controls are combo box controls that provide native support for item images.
You can use TComboBox to create a combo box or a combo box control in a parent TWindow,...
A TEdit is an interface object that represents an edit control interface element.
THotKey encapsulates the hot-key control, a window that allows the user to enter a combination of key...
An interface object that represents a corresponding list box element.
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
An abstract base class derived from TScrollBar, TSlider defines the basic behavior of sliders (contro...
An interface object that represents a static text interface element.
static TEdit & Create(tchar(TBuffer::*)[N], TWindow *p, int id, uint textLimit=0, TModule *m=0)
static TEdit & Create(tstring TBuffer::*, TWindow *p, int id, uint textLimit=0, TModule *m=0)
static void Restrict(tstring TBuffer::*field, TEdit &c)
static void Restrict(tchar(TBuffer::*field)[N], TEdit &c)
static void Restrict(tstring TBuffer::*field, TMemComboBox &c)
static TMemComboBox & Create(TComboBoxData TBuffer::*, TWindow *p, int id, const tstring &name, uint textLimit=255, uint itemLimit=25, TModule *m=0)
static TMemComboBox & Create(tstring TBuffer::*, TWindow *p, int id, const tstring &name, uint textLimit=255, uint itemLimit=25, TModule *m=0)
static TMemComboBox & Create(tchar(TBuffer::*)[N], TWindow *p, int id, const tstring &name, uint textLimit=255, uint itemLimit=25, TModule *m=0)
static void Restrict(tchar(TBuffer::*field)[N], TMemComboBox &c)
static void Restrict(TComboBoxData TBuffer::*field, TMemComboBox &c)
static TStatic & Create(tchar(TBuffer::*)[N], TWindow *p, int id, uint textLimit=0, TModule *m=0)
static void Restrict(tstring TBuffer::*field, TStatic &c)
static void Restrict(tchar(TBuffer::*field)[N], TStatic &c)
static TStatic & Create(tstring TBuffer::*, TWindow *p, int id, uint textLimit=0, TModule *m=0)
Provides a customization hook for binding and creating controls.
Generic binder implementation; restricts the field type for the given control type.
static TControlType & Create(TFieldType TBuffer::*, TWindow *p, int id, TArg1 a1, TArg2 a2, TArg3 a3, TArg4 a4, TArg5 a5, TArg6 a6, TArg7 a7)
static TControlType & Create(TFieldType TBuffer::*, TWindow *p, int id, TArg1 a1, TArg2 a2, TArg3 a3, TArg4 a4, TArg5 a5)
static TControlType & Create(TFieldType TBuffer::*, TWindow *p, int id)
static TControlType & Create(TFieldType TBuffer::*, TWindow *p, int id, TArg1 a1)
static TControlType & Create(TFieldType TBuffer::*, TWindow *p, int id, TArg1 a1, TArg2 a2, TArg3 a3, TArg4 a4, TArg5 a5, TArg6 a6)
static TControlType & Create(TFieldType TBuffer::*, TWindow *p, int id, TArg1 a1, TArg2 a2)
static void Restrict(TFieldType TBuffer::*, TControlType &)
static TControlType & Create(TFieldType TBuffer::*, TWindow *p, int id, TArg1 a1, TArg2 a2, TArg3 a3)
static TControlType & Create(TFieldType TBuffer::*, TWindow *p, int id, TArg1 a1, TArg2 a2, TArg3 a3, TArg4 a4)
Thrown if a more than one control tries to associate with the same field.
Thrown if a validator attempts to meddle with the transfer.
Thrown if a a control tries to associate with more than one field.
Thrown if a transfer is attempted with an unbound control.
Serves as the base class for safe transfer buffer windows.
void AssignField(TWindow &, size_t offset, size_t size)
Stores the field details and enables transfer for the given control.
Provides the type-safe interface needed to set up a safe transfer buffer.
TControlType & Bind(TFieldType TBuffer::*field, int id, TArg1 a1)
Overload; forwards extra constructor arguments to Create.
TControlType & Bind(TFieldType TBuffer::*field, int id, TArg1 a1, TArg2 a2, TArg3 a3)
Overload; forwards extra constructor arguments to Create.
TControlType & Bind(TFieldType TBuffer::*field, TControlType &c)
Maps the given control to the given field.
TBuffer TTransferBuffer
The template argument type.
TControlType & Bind(TFieldType TBuffer::*field, int id, TArg1 a1, TArg2 a2)
Overload; forwards extra constructor arguments to Create.
TControlType & Bind(TFieldType TBuffer::*field, int id, TArg1 a1, TArg2 a2, TArg3 a3, TArg4 a4)
Overload; forwards extra constructor arguments to Create.
TControlType & Bind(TFieldType TBuffer::*field, int id)
Creates a new control of the specified type by passing along the given arguments, then maps the given...
TControlType & Bind(TFieldType TBuffer::*field, int id, TArg1 a1, TArg2 a2, TArg3 a3, TArg4 a4, TArg5 a5, TArg6 a6, TArg7 a7)
Overload; forwards extra constructor arguments to Create.
TControlType & Bind(TFieldType TBuffer::*field, int id, TArg1 a1, TArg2 a2, TArg3 a3, TArg4 a4, TArg5 a5)
Overload; forwards extra constructor arguments to Create.
TControlType & Bind(TFieldType TBuffer::*field, int id, TArg1 a1, TArg2 a2, TArg3 a3, TArg4 a4, TArg5 a5, TArg6 a6)
Overload; forwards extra constructor arguments to Create.
void SetTransferBuffer(TBuffer *b)
Hides the unsafe version in TWindow.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
void SetTransferBuffer(void *transferBuffer, uint size)
Sets TransferBuffer and TransferBufferSize.
TXOwl is root class of the ObjectWindows exception hierarchy.
Definition of class TComboBoxEx.
Definition of class TComboBox and TComboBoxData the base class for all combobox controls.
Definition of class TDateTimePicker.
Definition of class TEdit.
#define _OBJ_FULLTYPENAME(obj)
TTransferDirection
The TTransferDirection enum describes the constants that the transfer function uses to determine how ...
Definition of class THotKey.
Definition of class TListBox and TlistBoxData.
Class definition for TMemComboBox (TComboBox).
Definition of class TMonthCalendar.
Object Windows Library (OWLNext Core)
tstring GetFullTypeName(T *w)
Helper; returns the type of a window as an tstring.
TControlType & RestrictCharArray(tchar(TBuffer::*)[N], TControlType &c)
Helper for char buffers; restricts the field type to a char array type of the right size.
Definition of class TRadioButton.
Definition of classes TSlider & TVSlider.
Definition of class TStatic, the class for static controls and base for any control that manages simp...
Base window class TWindow definition, including HWND encapsulation.