本文整理汇总了C++中JXWindow::GetIconWidget方法的典型用法代码示例。如果您正苦于以下问题:C++ JXWindow::GetIconWidget方法的具体用法?C++ JXWindow::GetIconWidget怎么用?C++ JXWindow::GetIconWidget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JXWindow
的用法示例。
在下文中一共展示了JXWindow::GetIconWidget方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void
TestWidget::Receive
(
JBroadcaster* sender,
const Message& message
)
{
JXWindow* window = GetWindow(); // insure that it isn't const
JXWindowIcon* windowIcon = NULL;
if (sender == itsAnimButton && message.Is(JXButton::kPushed))
{
if (GetCursorAnimator() == NULL)
{
CreateCursorAnimator();
itsAnimButton->SetShortcuts("^o^m");
itsAnimButton->SetLabel("Stop");
if (itsAnimColorTask != NULL)
{
(JXGetApplication())->InstallIdleTask(itsAnimColorTask);
}
}
else
{
RemoveCursorAnimator();
itsAnimButton->SetLabel("Start");
itsAnimButton->SetShortcuts("#a");
(JXGetApplication())->RemoveIdleTask(itsAnimColorTask);
}
}
else if (sender == itsQuitButton && message.Is(JXButton::kPushed))
{
(JXGetApplication())->Quit();
}
else if (window->GetIconWidget(&windowIcon) &&
sender == windowIcon && message.Is(JXWindowIcon::kHandleDrop))
{
const JXWindowIcon::HandleDrop* data =
dynamic_cast(const JXWindowIcon::HandleDrop*, &message);
assert( data != NULL );
HandleDNDDrop(JPoint(0,0), data->GetTypeList(), data->GetAction(),
data->GetTime(), data->GetSource());
}
else if (sender == window && message.Is(JXWindow::kIconified))
示例2: if
void
TestWidget::Receive
(
JBroadcaster* sender,
const Message& message
)
{
JXWindow* window = GetWindow(); // insure that it isn't const
JXWindowIcon* windowIcon = NULL;
if (sender == itsAnimButton && message.Is(JXButton::kPushed))
{
if (GetCursorAnimator() == NULL)
{
CreateCursorAnimator();
itsAnimButton->SetShortcuts("^o^m");
itsAnimButton->SetLabel("Stop");
}
else
{
RemoveCursorAnimator();
itsAnimButton->SetLabel("Start");
itsAnimButton->SetShortcuts("#a");
}
}
else if (sender == itsQuitButton && message.Is(JXButton::kPushed))
{
(JXGetApplication())->Quit();
}
else if (window->GetIconWidget(&windowIcon) &&
sender == windowIcon && message.Is(JXWindowIcon::kHandleDrop))
{
const JXWindowIcon::HandleDrop* data =
dynamic_cast<const JXWindowIcon::HandleDrop*>(&message);
assert( data != NULL );
HandleDNDDrop(JPoint(0,0), data->GetTypeList(), data->GetAction(),
data->GetTime(), data->GetSource());
}
else if (sender == itsActionsMenu && message.Is(JXMenu::kNeedsUpdate))
{
UpdateActionsMenu();
}
else if (sender == itsActionsMenu && message.Is(JXMenu::kItemSelected))
{
const JXMenu::ItemSelected* selection =
dynamic_cast<const JXMenu::ItemSelected*>(&message);
assert( selection != NULL );
HandleActionsMenu(selection->GetIndex());
}
else if (sender == itsPointMenu && message.Is(JXMenu::kNeedsUpdate))
{
UpdatePointMenu();
}
else if (sender == itsPointMenu && message.Is(JXMenu::kItemSelected))
{
const JXMenu::ItemSelected* selection =
dynamic_cast<const JXMenu::ItemSelected*>(&message);
assert( selection != NULL );
HandlePointMenu(selection->GetIndex());
}
else if (sender == itsSecretMenu && message.Is(JXMenu::kItemSelected))
{
const JXMenu::ItemSelected* selection =
dynamic_cast<const JXMenu::ItemSelected*>(&message);
assert( selection != NULL );
if (selection->GetIndex() == kSecretMenuDialogCmd)
{
(JGetUserNotification())->DisplayMessage(
"This message is generated by an item on the secret popup menu.");
}
}
else if (sender == itsResizeDialog && message.Is(JXDialogDirector::kDeactivated))
{
const JXDialogDirector::Deactivated* info =
dynamic_cast<const JXDialogDirector::Deactivated*>(&message);
assert( info != NULL );
if (info->Successful())
{
ChangeSize();
}
itsResizeDialog = NULL;
}
else
{
JXScrollableWidget::Receive(sender, message);
}
}