Jump to content

KrUserDataField: Difference between revisions

From EDM2
Ak120 (talk | contribs)
(No difference)

Revision as of 04:27, 13 February 2017

Description

#include "krwc.hpp"

This virtual class is used to provide KrWinComm support for variables of arbitrary types. Refer to the user's guide and the demo programs dialog3.cpp and demo.cpp for inforation on how to use it.

Derivation

KrUserDataField inherits from IBase.

Constructors

This is a virtual class. You cannot construct objects of this class. Instead, use this class as a base to define new classes and overwrite all functions.

No constructor is defined for this class.

Public Functions

Pure virtual functions

initialize

public: 
virtual int initialize (IMultiCellCanvas & c, int start) = 0; 

When this function is called, the drawing of the actual dialog window is currently taking place, and this object must now create its own window objects and place them in the IMultiCellCanvas c, starting at row start.

Only column 4 of c should be used. As many rows as desired may be used. The number of the first unused row must be returned.

For further details, refer to the user's guide and the demo programs dialog3.cpp and demo.cpp

transform

public: 
virtual Boolean transform (Boolean doIt) = 0; 

To give the user the opportunity to do input, window elements like IEntryField must be used. If doIt is true, this function must transform the data in the window element to the actual user data.

If doIt is false, the function may only test whether such a transform is possible with the data in the window element.

If successfull transformation is possible or has been performed, true is returned. Otherwise, false is returned.