• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ setFocusable函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中setFocusable函数的典型用法代码示例。如果您正苦于以下问题:C++ setFocusable函数的具体用法?C++ setFocusable怎么用?C++ setFocusable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了setFocusable函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: Widget

GuiTable::GuiTable(const Widget2 *const widget,
                   TableModel *const initial_model,
                   const bool opacity) :
    Widget(widget),
    MouseListener(),
    KeyListener(),
    mModel(nullptr),
    mTopWidget(nullptr),
    mActionListeners2(),
    mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT)),
    mSelectedRow(-1),
    mSelectedColumn(-1),
    mLinewiseMode(false),
    mWrappingEnabled(false),
    mOpaque(opacity),
    mSelectable(true)
{
    mAllowLogic = false;
    mBackgroundColor = getThemeColor(ThemeColorId::BACKGROUND);

    setModel(initial_model);
    setFocusable(true);

    addMouseListener(this);
    addKeyListener(this);
}
开发者ID:Action-Committee,项目名称:ManaPlus,代码行数:26,代码来源:guitable.cpp


示例2: setFocusable

void Tab::init()
{
    setFocusable(false);
    setFrameSize(0);
    mFlash = false;

    if (mInstances == 0)
    {
        // Load the skin
        Image *tab[TAB_COUNT];

        int a, x, y, mode;

        for (mode = 0; mode < TAB_COUNT; mode++)
        {
            tab[mode] = Theme::getImageFromTheme(data[mode].file);
            a = 0;
            for (y = 0; y < 3; y++)
            {
                for (x = 0; x < 3; x++)
                {
                    tabImg[mode].grid[a] = tab[mode]->getSubImage(
                            data[x].gridX, data[y].gridY,
                            data[x + 1].gridX - data[x].gridX + 1,
                            data[y + 1].gridY - data[y].gridY + 1);
                    tabImg[mode].grid[a]->setAlpha(mAlpha);
                    a++;
                }
            }
            tab[mode]->decRef();
        }
    }
    mInstances++;
}
开发者ID:TonyRice,项目名称:mana,代码行数:34,代码来源:tab.cpp


示例3: sprite_

TSpriteIcon::TSpriteIcon() :
    sprite_(NULL)
{
    setFrameSize(1);
    setFocusable(0);
    setVisible(1);
}
开发者ID:hoodwolf,项目名称:Infraelly,代码行数:7,代码来源:TSpriteIcon.cpp


示例4: setFocusable

void Slider::init()
{
    mAllowLogic = false;
    setFocusable(true);
    setFrameSize(1);

    addMouseListener(this);
    addKeyListener(this);

    setFrameSize(0);

    // Load resources
    if (mInstances == 0)
    {
        if (theme)
        {
            for (int mode = 0; mode < 2; mode ++)
                theme->loadRect(buttons[mode], data[mode], "slider.xml", 0, 8);
        }
        updateAlpha();
    }

    mInstances++;

    if (buttons[0].grid[HGRIP])
        setMarkerLength(buttons[0].grid[HGRIP]->getWidth());
}
开发者ID:Rawng,项目名称:ManaPlus,代码行数:27,代码来源:slider.cpp


示例5: mInventory

ItemContainer::ItemContainer(Inventory *inventory, bool forceQuantity):
    mInventory(inventory),
    mGridColumns(1),
    mGridRows(1),
    mSelectedIndex(-1),
    mHighlightedIndex(-1),
    mLastUsedSlot(-1),
    mSelectionStatus(SEL_NONE),
    mForceQuantity(forceQuantity),
    mSwapItems(false),
    mDescItems(false)
{
    mItemPopup = new ItemPopup;
    setFocusable(true);

    ResourceManager *resman = ResourceManager::getInstance();

    mSelImg = resman->getImage("graphics/gui/selection.png");
    if (!mSelImg)
        logger->error("Unable to load selection.png");

    addKeyListener(this);
    addMouseListener(this);
    addWidgetListener(this);
}
开发者ID:mekolat,项目名称:elektrogamesvn,代码行数:25,代码来源:itemcontainer.cpp


示例6: highestTab

  TabbedPane::TabbedPane( Widget * tabContainer /*= NULL*/,
                   Widget *widgetContainer /*= NULL*/ )
   : highestTab(0), tabPadding(0), resizeTabContent(false),
     selectedTab(reinterpret_cast<Tab*>(NULL),reinterpret_cast<Widget*>(NULL))
  {
    if(tabContainer)
    {
      isMaintainingTabContainer = false;
      this->tabContainer = tabContainer;
    }
    else
    {
      isMaintainingTabContainer = true;
      this->tabContainer = new EmptyWidget();
    }

    if(widgetContainer)
    {
      isMaintainingWidgetContainer = false;
      this->widgetContainer = widgetContainer;
    }
    else
    {
      isMaintainingWidgetContainer = true;
      this->widgetContainer = new EmptyWidget();
    }

    addPrivateChild(this->tabContainer);
    addPrivateChild(this->widgetContainer);
    setTabable(true);
    setFocusable(true);
	setReverseTabable(false);

    adjustTabs();
  }
开发者ID:jmasterx,项目名称:Agui,代码行数:35,代码来源:TabbedPane.cpp


示例7: mMap

Viewport::Viewport():
    mMap(0),
    mMouseX(0),
    mMouseY(0),
    mPixelViewX(0.0f),
    mPixelViewY(0.0f),
    mDebugFlags(0),
    mPlayerFollowMouse(false),
    mLocalWalkTime(-1),
    mHoverBeing(0),
    mHoverItem(0)
{
    setOpaque(false);
    addMouseListener(this);

    mScrollLaziness = config.getIntValue("ScrollLaziness");
    mScrollRadius = config.getIntValue("ScrollRadius");
    mScrollCenterOffsetX = config.getIntValue("ScrollCenterOffsetX");
    mScrollCenterOffsetY = config.getIntValue("ScrollCenterOffsetY");

    mPopupMenu = new PopupMenu;
    mBeingPopup = new BeingPopup;

    setFocusable(true);

    listen(Event::ConfigChannel);
    listen(Event::ActorSpriteChannel);
}
开发者ID:mobilehub,项目名称:mana,代码行数:28,代码来源:viewport.cpp


示例8: mInventory

ItemContainer::ItemContainer(Inventory *inventory, bool forceQuantity):
    mInventory(inventory),
    mGridColumns(1),
    mGridRows(1),
    mSelectedIndex(-1),
    mHighlightedIndex(-1),
    mLastUsedSlot(-1),
    mSelectionStatus(SEL_NONE),
    mForceQuantity(forceQuantity),
    mSwapItems(false),
    mDescItems(false),
    mTag(0),
    mSortType(0),
    mItemPopup(new ItemPopup),
    mShowMatrix(nullptr),
    mClicks(1),
    mEquipedColor(Theme::getThemeColor(Theme::ITEM_EQUIPPED)),
    mUnEquipedColor(Theme::getThemeColor(Theme::ITEM_NOT_EQUIPPED))
{
    setFocusable(true);

    mSelImg = Theme::getImageFromTheme("selection.png");
    if (!mSelImg)
        logger->log1("Error: Unable to load selection.png");

    addKeyListener(this);
    addMouseListener(this);
    addWidgetListener(this);
}
开发者ID:Evonline,项目名称:ManaPlus,代码行数:29,代码来源:itemcontainer.cpp


示例9: addMouseListener

void Tab::init()
{
    addMouseListener(this);
    setFocusable(false);
    setFrameSize(0);
    mFlash = 0;

    addWidgetListener(this);

    if (mInstances == 0)
    {
        // Load the skin
        Theme *const theme = Theme::instance();
        if (theme)
        {
            for (int mode = 0; mode < TAB_COUNT; mode ++)
                tabImg[mode] = theme->load(data[mode], "tab.xml");
        }
        updateAlpha();
    }
    mInstances++;

    add(mLabel);

    const Skin *const skin = tabImg[TAB_STANDARD];
    if (!skin)
        return;
    const int padding = skin->getPadding();

    mLabel->setPosition(padding, padding);
}
开发者ID:sangohan,项目名称:tmw-manaplus-client,代码行数:31,代码来源:tab.cpp


示例10: Container

TabbedArea::TabbedArea(bool hide) :
    Container(),
    mHideWhenOneTab(hide),
    mSelectedTab(NULL)
{
    setFocusable(false);
    addKeyListener(this);
    addMouseListener(this);

    mTabContainer = new Container();
    mTabContainer->setOpaque(false);
    mWidgetContainer = new Container();
    mWidgetContainer->setOpaque(false);

    add(mTabContainer);
    add(mWidgetContainer);

    mProtFocusListener = new ProtectedFocusListener();

    addFocusListener(mProtFocusListener);

    mProtFocusListener->blockKey(SDLK_LEFT);
    mProtFocusListener->blockKey(SDLK_RIGHT);
    mProtFocusListener->blockKey(SDLK_UP);
    mProtFocusListener->blockKey(SDLK_DOWN);
}
开发者ID:Aethyra,项目名称:Client,代码行数:26,代码来源:tabbedarea.cpp


示例11: setScrollPolicy

FFScrollArea::FFScrollArea()
{
    setScrollPolicy(ShowNever,
                    ShowNever);
    addKeyListener(this);
    setFocusable(false);
    setFrameSize(0);
}
开发者ID:sanyaade-g2g-repos,项目名称:guichan,代码行数:8,代码来源:ffscrollarea.cpp


示例12: setMarked

 CheckBox::CheckBox()
 {
     setMarked(false);
     
     setFocusable(true);
     addMouseListener(this);
     addKeyListener(this);
 }
开发者ID:OneSleepyDev,项目名称:boswars_osd,代码行数:8,代码来源:checkbox.cpp


示例13: Widget

Menu::Menu(Layer& layer):
  Widget(layer),
  m_selection(NO_ITEM)
{
  setDraggable(true);
  setFocusable(true);
  hide();
}
开发者ID:elmindreda,项目名称:Nori,代码行数:8,代码来源:Menu.cpp


示例14: setSelected

    RadioButton::RadioButton()
    {
        setSelected(false);

        setFocusable(true);
        addMouseListener(this);
        addKeyListener(this);
    }
开发者ID:Thann,项目名称:chaotic-rage,代码行数:8,代码来源:radiobutton.cpp


示例15: mCurrentSelection

    MultiSelector::MultiSelector()
        : mCurrentSelection(0),
        mFrameCounter(0)
    {
        setFocusable(true);
        mSelectorImage = gcn::Image::load(ResourceHandler::getInstance()->getRealFilename("menu-selector.bmp"));

        addKeyListener(this);
    }
开发者ID:olofn,项目名称:db_public,代码行数:9,代码来源:mutliselector.cpp


示例16: setWidth

 ListBox::ListBox()
 {    
     mSelected = -1;
     mListModel = NULL;
     setWidth(100);
     setFocusable(true);
 
     addMouseListener(this);
     addKeyListener(this);
 }
开发者ID:OneSleepyDev,项目名称:boswars_osd,代码行数:10,代码来源:listbox.cpp


示例17: m_frame

	MessageBoxContainer::MessageBoxContainer( Frame* frame, MessageBox* msg )
		: m_frame(frame),m_msg(msg)
	{
		add(m_frame);
		setMargins(0,0,0,0);
		m_frame->setResizable(false);
		m_frame->setMovable(false);
		setVisibility(false);
		setFocusable(false);
	}
开发者ID:jmasterx,项目名称:StemwaterSpades,代码行数:10,代码来源:MessageBoxContainer.cpp


示例18: _coveredBy

gcn::Panel::Panel(int initialSpaceX, int initialSpaceY)
: _coveredBy(NULL)
{
    _slotsx = -1;
    _slotsy = -1;
    _maxheight = 0;
    _spacingX = initialSpaceX;
    _spacingY = initialSpaceY;
    setFocusable(false);
    clear();
}
开发者ID:IamusNavarathna,项目名称:lv3proj,代码行数:11,代码来源:Panel.cpp


示例19: mEditable

    TextField::TextField():
        mEditable(true),
        mXScroll(0)
    {
        mText = new Text();

        setFocusable(true);

        addMouseListener(this);
        addKeyListener(this);
    }
开发者ID:sanyaade-g2g-repos,项目名称:guichan,代码行数:11,代码来源:textfield.cpp


示例20: mSelected

    ListBox::ListBox(ListModel *listModel)
        : mSelected(-1),
          mWrappingEnabled(false)
    {
        setWidth(100);
        setListModel(listModel);
        setFocusable(true);

        addMouseListener(this);
        addKeyListener(this);
    }
开发者ID:ArkBriar,项目名称:rlvm,代码行数:11,代码来源:listbox.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ setFontSize函数代码示例发布时间:2022-05-30
下一篇:
C++ setFocusProxy函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap