Beispiel #1
0
void addResizablePanel( const FlexPanel_p& pParent, const Widget_p& pChild, const MsgRouter_p& pMsgRouter )
{
	Hook * pHook = pParent->addWidget( pChild );
//	pMsgRouter->AddCallback( MsgFilter::MouseButtonDrag(pChild, 3), cbResize, pHook );

	pMsgRouter->addRoute( MsgFilter::mousePress(WG_BUTTON_LEFT), pChild, MsgFunc::create(cbInitDrag, pChild) );
	pMsgRouter->addRoute( MsgFilter::mouseDrag(WG_BUTTON_LEFT), pChild, MsgFunc::create(cbDragWidget, pChild) );
}
Beispiel #2
0
void addResizablePanel( const FlexPanel_p& pParent, const Widget_p& pChild, const MsgRouter_p& pMsgRouter )
{
	FlexHook * pHook = pParent->addWidget( pChild );
	pHook->setSizePolicy(SizePolicy::Bound, SizePolicy::Bound);

	pMsgRouter->addRoute( pChild, MsgFunc::create(cbMoveResize, pChild) );
}