mitushkin-infa/BoundsUnit.h

45 lines
970 B
C++

#ifndef BoundsUnitH
#define BoundsUnitH
#include <System.Classes.hpp>
#include <Vcl.Controls.hpp>
#include <Vcl.StdCtrls.hpp>
#include <Vcl.Forms.hpp>
#include <Vcl.ComCtrls.hpp>
#include <Vcl.ExtCtrls.hpp>
class TfrmBounds : public TForm
{
__published:
TPanel *pnlTop;
TLabel *lblFigure;
TGroupBox *gbPos;
TGroupBox *gbSize;
TLabel *lblX;
TLabel *lblY;
TLabel *lblW;
TLabel *lblH;
TEdit *edtX;
TEdit *edtY;
TEdit *edtW;
TEdit *edtH;
TUpDown *udX;
TUpDown *udY;
TUpDown *udW;
TUpDown *udH;
TButton *btnOk;
TButton *btnCancel;
void __fastcall btnOkClick(TObject *Sender);
private:
void Put(TEdit *e, TUpDown *ud, int v);
int minW, maxW, minH, maxH;
bool Valid(TEdit *e, String what, int a, int b);
public:
__fastcall TfrmBounds(TComponent* Owner);
bool Edit(String title, int &x, int &y, int &w, int &h,
int wMin, int wMax, int hMin, int hMax);
};
extern PACKAGE TfrmBounds *frmBounds;
#endif