Kaydet (Commit) 5a915202 authored tarafından Noel Grandin's avatar Noel Grandin

convert Link<> to typed

Change-Id: Ibb426c6d0cd81ff866c431be8277849e002df57a
üst 39da0a99
...@@ -37,19 +37,16 @@ namespace dbaui ...@@ -37,19 +37,16 @@ namespace dbaui
Rectangle aScrollArea( Point(0, _rOutputSize.Height() - LISTBOX_SCROLLING_AREA), Rectangle aScrollArea( Point(0, _rOutputSize.Height() - LISTBOX_SCROLLING_AREA),
Size(_rOutputSize.Width(), LISTBOX_SCROLLING_AREA) ); Size(_rOutputSize.Width(), LISTBOX_SCROLLING_AREA) );
Link<> aToCall;
// if pointer in bottom area begin scroll // if pointer in bottom area begin scroll
if( aScrollArea.IsInside(_rPoint) ) if( aScrollArea.IsInside(_rPoint) )
aToCall = m_aUpScroll; m_aUpScroll.Call(NULL);
else else
{ {
aScrollArea.SetPos(Point(0,0)); aScrollArea.SetPos(Point(0,0));
// if pointer in top area begin scroll // if pointer in top area begin scroll
if( aScrollArea.IsInside(_rPoint) ) if( aScrollArea.IsInside(_rPoint) )
aToCall = m_aDownScroll; m_aDownScroll.Call(NULL);
} }
if ( aToCall.IsSet() )
aToCall.Call( NULL );
} }
} }
......
...@@ -413,16 +413,14 @@ void scrollWindow(DBTreeListBox* _pListBox, const Point& _rPos,bool _bUp) ...@@ -413,16 +413,14 @@ void scrollWindow(DBTreeListBox* _pListBox, const Point& _rPos,bool _bUp)
} }
} }
IMPL_LINK( DBTreeListBox, ScrollUpHdl, SvTreeListBox*, /*pBox*/ ) IMPL_LINK_NOARG_TYPED( DBTreeListBox, ScrollUpHdl, LinkParamNone*, void )
{ {
scrollWindow(this,m_aMousePos,true); scrollWindow(this,m_aMousePos,true);
return 0;
} }
IMPL_LINK( DBTreeListBox, ScrollDownHdl, SvTreeListBox*, /*pBox*/ ) IMPL_LINK_NOARG_TYPED( DBTreeListBox, ScrollDownHdl, LinkParamNone*, void )
{ {
scrollWindow(this,m_aMousePos,false); scrollWindow(this,m_aMousePos,false);
return 0;
} }
namespace namespace
......
...@@ -27,8 +27,8 @@ namespace dbaui ...@@ -27,8 +27,8 @@ namespace dbaui
{ {
class OScrollHelper class OScrollHelper
{ {
Link<> m_aUpScroll; Link<LinkParamNone*,void> m_aUpScroll;
Link<> m_aDownScroll; Link<LinkParamNone*,void> m_aDownScroll;
public: public:
/** default constructor /** default constructor
*/ */
...@@ -40,7 +40,7 @@ namespace dbaui ...@@ -40,7 +40,7 @@ namespace dbaui
@param _rUpScroll @param _rUpScroll
the method to set the method to set
*/ */
inline void setUpScrollMethod( const Link<>& _rUpScroll ) inline void setUpScrollMethod( const Link<LinkParamNone*,void>& _rUpScroll )
{ {
m_aUpScroll = _rUpScroll; m_aUpScroll = _rUpScroll;
} }
...@@ -49,7 +49,7 @@ namespace dbaui ...@@ -49,7 +49,7 @@ namespace dbaui
@param _rDownScroll @param _rDownScroll
the method to set the method to set
*/ */
inline void setDownScrollMethod( const Link<>& _rDownScroll ) inline void setDownScrollMethod( const Link<LinkParamNone*,void>& _rDownScroll )
{ {
m_aDownScroll = _rDownScroll; m_aDownScroll = _rDownScroll;
} }
......
...@@ -76,8 +76,8 @@ namespace dbaui ...@@ -76,8 +76,8 @@ namespace dbaui
void init(); void init();
DECL_LINK_TYPED( OnTimeOut, Timer*, void ); DECL_LINK_TYPED( OnTimeOut, Timer*, void );
DECL_LINK_TYPED( OnResetEntry, void*, void ); DECL_LINK_TYPED( OnResetEntry, void*, void );
DECL_LINK( ScrollUpHdl, SvTreeListBox* ); DECL_LINK_TYPED( ScrollUpHdl, LinkParamNone*, void );
DECL_LINK( ScrollDownHdl, SvTreeListBox* ); DECL_LINK_TYPED( ScrollDownHdl, LinkParamNone*, void );
public: public:
DBTreeListBox( vcl::Window* pParent DBTreeListBox( vcl::Window* pParent
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment