// Окно "Положение и размер" #ifndef BoundsUnitH #define BoundsUnitH #include #include #include #include #include #include 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