本文整理汇总了C++中RelayMouseMessage函数的典型用法代码示例。如果您正苦于以下问题:C++ RelayMouseMessage函数的具体用法?C++ RelayMouseMessage怎么用?C++ RelayMouseMessage使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RelayMouseMessage函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RelayMouseMessage
bool ctrlScrollBar::Msg_LeftUp(const MouseCoords& mc)
{
move = false;
// ButtonMessages weiterleiten
return RelayMouseMessage(&Window::Msg_LeftUp, mc);
}
示例2: if
bool ctrlScrollBar::Msg_LeftDown(const MouseCoords& mc)
{
if (Coll(mc.x, mc.y, GetX(), GetY() + button_height + scrollbar_pos, width_, scrollbar_height))
{
// Maus auf dem Scrollbutton
move = true;
return true;
}
else if (Coll(mc.x, mc.y, GetX(), GetY(), width_, button_height) || Coll(mc.x, mc.y, GetX(), GetY() + height_ - button_height, width_, button_height))
{
// Maus auf einer Schaltflaeche
return RelayMouseMessage(&Window::Msg_LeftDown, mc);
}
else
{
// Maus auf der Leiste
unsigned short diff = scrollbar_height / 2;
if (Coll(mc.x, mc.y, GetX(), GetY() + button_height, width_, scrollbar_pos))
{
if (scrollbar_pos < diff)
scrollbar_pos = 0;
else
scrollbar_pos -= diff;
CalculatePosition();
parent_->Msg_ScrollChange(id_, scroll_pos);
return true;
}
else
{
unsigned short sbb = button_height + scrollbar_pos + scrollbar_height;
if (Coll(mc.x, mc.y, GetX(), GetY() + sbb, width_, height_ - (sbb + button_height)))
{
scrollbar_pos += diff;
if (scrollbar_pos > (scroll_height - scrollbar_height))
scrollbar_pos = scroll_height - scrollbar_height;
CalculatePosition();
parent_->Msg_ScrollChange(id_, scroll_pos);
return true;
}
}
}
return false;
}
示例3: SetSelection
/**
*
*
* @author OLiver
*/
bool ctrlTable::Msg_RightDown(const MouseCoords& mc)
{
if(Coll(mc.x, mc.y, GetX(), GetY()+header_height, width-20, height))
{
SetSelection((mc.y - header_height - GetY()) / font->getHeight() + GetCtrl<ctrlScrollBar>(0)->GetPos(), false);
if(parent)
parent->Msg_TableRightButton(this->id,row_r_selection);
return true;
}
else
return RelayMouseMessage(&Window::Msg_RightDown, mc);
}
示例4: RelayMouseMessage
/**
*
*
* @author OLiver
*/
bool ctrlProgress::Msg_MouseMove(const MouseCoords& mc)
{
// an Buttons weiterleiten
RelayMouseMessage(&Window::Msg_MouseMove, mc);
if(Coll(mc.x, mc.y, GetX() + height_ + x_padding, GetY(), width_ - height_ * 2 - x_padding * 2, height_))
{
WINDOWMANAGER.SetToolTip(this, tooltip_);
return true;
}
else
{
WINDOWMANAGER.SetToolTip(this, "");
return false;
}
}
示例5: UpdatePosFromSlider
bool ctrlScrollBar::Msg_MouseMove(const MouseCoords& mc)
{
if(isMouseScrolling)
{
const int moveDist = mc.y - last_y;
sliderPos += moveDist;
if(sliderPos + sliderHeight > scroll_height)
sliderPos = moveDist < 0 ? 0 : (scroll_height - sliderHeight);
UpdatePosFromSlider();
}
last_y = mc.y;
// ButtonMessages weiterleiten
return RelayMouseMessage(&Window::Msg_MouseMove, mc);
}
示例6: RelayMouseMessage
bool ctrlComboBox::Msg_RightDown(const MouseCoords& mc)
{
ctrlList* list = GetCtrl<ctrlList>(0);
// Für Button und Liste weiterleiten (und danach erst schließen)
bool ret = RelayMouseMessage(&Window::Msg_RightDown, mc);
// Clicked on list -> close it
if(!readonly && Coll(mc.x, mc.y, GetX(), GetY() + height_, width_, height_ + list->GetHeight()))
{
// Liste wieder ausblenden
ShowList(false);
}
return ret;
}
示例7: CalculatePosition
bool ctrlScrollBar::Msg_MouseMove(const MouseCoords& mc)
{
if(move)
{
scrollbar_pos += (mc.y - last_y);
if(scrollbar_pos + scrollbar_height > scroll_height)
scrollbar_pos = ((mc.y - last_y) < 0 ? 0 : (scroll_height - scrollbar_height));
CalculatePosition();
if(scroll_pos > scroll_range - pagesize)
scroll_pos = scroll_range - pagesize;
parent_->Msg_ScrollChange(id_, scroll_pos);
}
last_y = mc.y;
// ButtonMessages weiterleiten
return RelayMouseMessage(&Window::Msg_MouseMove, mc);
}
示例8: GetX
/**
*
*
* @author OLiver
*/
bool ctrlProgress::Msg_LeftDown(const MouseCoords& mc)
{
// Test if clicked on progress bar
if(Coll(mc.x, mc.y,
GetX() + height_ + 2 + x_padding, GetY() + 4 + y_padding,
width_ - height_ * 2 - 4 - 2 * x_padding, height_ - 8 - 2 * y_padding))
{
// The additional check for (position > maximum) is
// mathematically redundant here; if there was more code than
// it in SetPosition() we had to call it here instead of simply:
position = ( mc.x - (GetX() + height_ + 2 + x_padding)
+ /*rounding:*/ (width_ - height_ * 2 - 4 - 2 * x_padding) / maximum / 2)
* maximum / (width_ - height_ * 2 - 4 - 2 * x_padding);
if(parent_) parent_->Msg_ProgressChange(GetID(), position);
return true;
}
else
return RelayMouseMessage(&Window::Msg_LeftDown, mc);
}
示例9: if
bool ctrlScrollBar::Msg_LeftDown(const MouseCoords& mc)
{
if (Coll(mc.x, mc.y, GetX(), GetY() + button_height + sliderPos, width_, sliderHeight))
{
// Maus auf dem Scrollbutton
isMouseScrolling = true;
return true;
} else if (Coll(mc.x, mc.y, GetX(), GetY() + button_height, width_, sliderPos))
{
// Clicked above slider -> Move half a slider height up
if (sliderPos < sliderHeight / 2)
sliderPos = 0;
else
sliderPos -= sliderHeight / 2;
UpdatePosFromSlider();
return true;
}
else
{
unsigned short bottomSliderPos = button_height + sliderPos + sliderHeight;
if (Coll(mc.x, mc.y, GetX(), GetY() + bottomSliderPos, width_, height_ - (bottomSliderPos + button_height)))
{
// Clicked below slider -> Move half a slider height down
sliderPos += sliderHeight / 2;
if(sliderPos + sliderHeight > scroll_height)
{
RTTR_Assert(scroll_height > sliderHeight); // Otherwise the scrollbar should be hidden
sliderPos = scroll_height - sliderHeight;
}
UpdatePosFromSlider();
return true;
}
}
return RelayMouseMessage(&Window::Msg_LeftDown, mc);
}
示例10: ShowList
bool ctrlComboBox::Msg_LeftDown(const MouseCoords& mc)
{
ctrlList* list = GetCtrl<ctrlList>(0);
// Irgendwo anders hingeklickt --> Liste ausblenden
if(!readonly && !Coll(mc.x, mc.y, GetX(), GetY(), width_, height_ + list->GetHeight()))
{
// Liste wieder ausblenden
ShowList(false);
return false;
}
if(!readonly && Coll(mc.x, mc.y, GetX(), GetY(), width_, height_))
{
// Liste wieder ein/ausblenden
ShowList(!list->GetVisible());
return true;
}
// Für Button und Liste weiterleiten
return RelayMouseMessage(&Window::Msg_LeftDown, mc);
}
示例11: RelayMouseMessage
/**
*
*
* @author OLiver
*/
bool ctrlTab::Msg_MouseMove(const MouseCoords& mc)
{
return RelayMouseMessage(&Window::Msg_MouseMove, mc);
}
示例12: RelayMouseMessage
/**
*
*
* @author OLiver
*/
bool ctrlOptionGroup::Msg_LeftUp(const MouseCoords& mc)
{
return RelayMouseMessage(&Window::Msg_LeftUp, mc);
}
示例13: RelayMouseMessage
/**
*
*
* @author OLiver
*/
bool ctrlGroup::Msg_RightUp(const MouseCoords& mc)
{
return RelayMouseMessage(&Window::Msg_RightUp, mc);
}
示例14: RelayMouseMessage
bool ctrlMultiSelectGroup::Msg_MouseMove(const MouseCoords& mc)
{
return RelayMouseMessage(&Window::Msg_MouseMove, mc);
}
示例15: RelayMouseMessage
/**
*
*
* @author OLiver
*/
bool ctrlTable::Msg_MouseMove(const MouseCoords& mc)
{
// ButtonMessages weiterleiten
return RelayMouseMessage(&Window::Msg_MouseMove, mc);
}