当前位置: 首页>>代码示例>>C++>>正文


C++ JXWindow::GetIconWidget方法代码示例

本文整理汇总了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))
开发者ID:mta1309,项目名称:mulberry-lib-jx,代码行数:46,代码来源:TestWidget.cpp

示例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);
		}
}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:93,代码来源:TestWidget.cpp


注:本文中的JXWindow::GetIconWidget方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。