|
From: Emilien K. <cur...@us...> - 2005-02-25 10:44:10
|
Update of /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30370/include/wxDevCenter/StdPlugin Modified Files: BitmapCtrl.h Log Message: Ajout des ancres de dimension Index: BitmapCtrl.h =================================================================== RCS file: /cvsroot/wxdevcenter/StdPlugin/include/wxDevCenter/StdPlugin/BitmapCtrl.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** BitmapCtrl.h 24 Feb 2005 17:26:48 -0000 1.7 --- BitmapCtrl.h 25 Feb 2005 10:43:41 -0000 1.8 *************** *** 34,37 **** --- 34,39 ---- #include <wxDevCenter/StdPlugin/extmouse.h> + /** Style à appliquer aux BitmapCtrl pour afficher les ancres de dimensionnement.*/ + #define BMP_SHOW_ANCHOR 0x100 /** Controle d'affichage de bitmap. *************** *** 67,71 **** public: ! /** Constructeur standard des controles.*/ BitmapCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); /** Destructeur.*/ --- 69,75 ---- public: ! /** Constructeur standard des controles. ! * ! */ BitmapCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); /** Destructeur.*/ *************** *** 137,140 **** --- 141,165 ---- wxRect BitmapToClient(wxRect r)const{return wxRect(BitmapToClient(r.GetPosition()), BitmapToClient(r.GetSize()));} + /** Flags de test de position.*/ + enum HitTestFlag + { + BMP_HTF_NONE = 0x0, + BMP_HTF_BITMAP = 0x1, + BMP_HTF_ANCHOR_NW = 0x10, + BMP_HTF_ANCHOR_N = 0x20, + BMP_HTF_ANCHOR_NE = 0x40, + BMP_HTF_ANCHOR_SW = 0x80, + BMP_HTF_ANCHOR_S = 0x100, + BMP_HTF_ANCHOR_SE = 0x200, + BMP_HTF_ANCHOR_E = 0x400, + BMP_HTF_ANCHOR_W = 0x800 + }; + + /** Teste une position sur la zone client. + * Les ancres ne sont testés que si elles sont affichées. + * @param pos Position en coordonnées clientes + * @return Flag indicant sur quoi la position pointe. + */ + HitTestFlag HitTest(wxPoint pos)const; protected: /** Retourne le coefficient de scalling (wxDC) depuis le zoom m_iZoom.*/ |