41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
#ifndef _FACTOR_HPP_
|
||
#define _FACTOR_HPP_
|
||
#include <mdiwin/dwindow.hpp>
|
||
#include <mdiwin/vector.hpp>
|
||
#include <mdiwin/block.hpp>
|
||
#include <mdiwin/string.hpp>
|
||
|
||
class Factor : public DWindow
|
||
{
|
||
public:
|
||
enum Type{Incremental,NonIncremental};
|
||
enum Operation{Add,Subtract,Multiply,Divide,None};
|
||
Factor(HWND hParent,const char *caption);
|
||
~Factor();
|
||
WORD showFactor(double &widthFactor,double &heightFactor);
|
||
WORD showFactor(double &widthFactor,double &heightFactor,
|
||
double &widthIncremental,Operation &widthOperation,
|
||
double &heightIncremental, Operation &heightOperation);
|
||
private:
|
||
enum{MaxCaption=70};
|
||
virtual int DlgProc(UINT message,WPARAM wParam,LPARAM lParam);
|
||
void initializeStrings(void);
|
||
void currentOperation(WORD stringIndex,Operation &operation)const;
|
||
|
||
HWND mhParent;
|
||
HINSTANCE mhInstance;
|
||
char mCaption[MaxCaption];
|
||
double mWidthFactor;
|
||
double mWidthIncremental;
|
||
Operation mWidthOperation;
|
||
double mHeightFactor;
|
||
double mHeightIncremental;
|
||
Operation mHeightOperation;
|
||
Type mFactorType;
|
||
Block<String> mWidthStrings;
|
||
Block<String> mHeightStrings;
|
||
WORD mWidthStringIndex;
|
||
WORD mHeightStringIndex;
|
||
};
|
||
#endif
|
||
|