// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifndef __GENERICHYPERLINKCTRLH__
-#define __GENERICHYPERLINKCTRLH__
-
-#include "wx/defs.h"
-#include "wx/control.h"
-
+#ifndef _WX_GENERICHYPERLINKCTRL_H_
+#define _WX_GENERICHYPERLINKCTRL_H_
// ----------------------------------------------------------------------------
// wxGenericHyperlinkCtrl
// handles "Copy URL" menuitem
void OnPopUpCopy(wxCommandEvent& event);
- // Refreshes the control to update label's position if necessary
- void OnSize(wxSizeEvent& event);
-
-
// overridden base class virtuals
// Returns the best size for the window, which is the size needed
DECLARE_DYNAMIC_CLASS(wxGenericHyperlinkCtrl)
};
-#endif // __GENERICHYPERLINKCTRLH__
+#endif // _WX_GENERICHYPERLINKCTRL_H_
// do validation checks:
CheckParams(label, url, style);
+ if ((style & wxHL_ALIGN_LEFT) == 0)
+ style |= wxFULL_REPAINT_ON_RESIZE;
+
if (!wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name))
return false;
// with GTK+'s native handling):
Connect( wxEVT_PAINT, wxPaintEventHandler(wxGenericHyperlinkCtrl::OnPaint) );
- Connect( wxEVT_SIZE, wxSizeEventHandler(wxGenericHyperlinkCtrl::OnSize) );
Connect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler(wxGenericHyperlinkCtrl::OnLeaveWindow) );
Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler(wxGenericHyperlinkCtrl::OnLeftDown) );
#endif // wxUSE_CLIPBOARD
}
-void wxGenericHyperlinkCtrl::OnSize(wxSizeEvent& WXUNUSED(event))
-{
- // update the position of the label in the screen respecting
- // the selected align flag
- Refresh();
-}
-
#endif // wxUSE_HYPERLINKCTRL