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


C++ TextButton::setConnectedEdges方法代码示例

本文整理汇总了C++中TextButton::setConnectedEdges方法的典型用法代码示例。如果您正苦于以下问题:C++ TextButton::setConnectedEdges方法的具体用法?C++ TextButton::setConnectedEdges怎么用?C++ TextButton::setConnectedEdges使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TextButton的用法示例。


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

示例1: LookAndFeelDemoComponent

    LookAndFeelDemoComponent()
    {
        addAndMakeVisible (rotarySlider);
        rotarySlider.setSliderStyle (Slider::RotaryHorizontalVerticalDrag);
        rotarySlider.setTextBoxStyle (Slider::NoTextBox, false, 0, 0);
        rotarySlider.setValue (2.5);

        addAndMakeVisible (verticalSlider);
        verticalSlider.setSliderStyle (Slider::LinearVertical);
        verticalSlider.setTextBoxStyle (Slider::NoTextBox, false, 90, 20);
        verticalSlider.setValue (6.2);

        addAndMakeVisible (barSlider);
        barSlider.setSliderStyle (Slider::LinearBar);
        barSlider.setValue (4.5);

        addAndMakeVisible (incDecSlider);
        incDecSlider.setSliderStyle (Slider::IncDecButtons);
        incDecSlider.setRange (0.0, 10.0, 1.0);
        incDecSlider.setIncDecButtonsMode (Slider::incDecButtonsDraggable_Horizontal);
        incDecSlider.setTextBoxStyle (Slider::TextBoxBelow, false, 90, 20);

        addAndMakeVisible (button1);
        button1.setButtonText ("Hello World!");

        addAndMakeVisible (button2);
        button2.setButtonText ("Hello World!");
        button2.setClickingTogglesState (true);
        button2.setToggleState (true, dontSendNotification);

        addAndMakeVisible (button3);
        button3.setButtonText ("Hello World!");

        addAndMakeVisible (button4);
        button4.setButtonText ("Toggle Me");
        button4.setToggleState (true, dontSendNotification);

        for (int i = 0; i < 3; ++i)
        {
            TextButton* b = radioButtons.add (new TextButton());
            addAndMakeVisible (b);
            b->setRadioGroupId (42);
            b->setClickingTogglesState (true);
            b->setButtonText ("Button " + String (i + 1));

            switch (i)
            {
                case 0:     b->setConnectedEdges (Button::ConnectedOnRight);                            break;
                case 1:     b->setConnectedEdges (Button::ConnectedOnRight + Button::ConnectedOnLeft);  break;
                case 2:     b->setConnectedEdges (Button::ConnectedOnLeft);                             break;
                default:    break;
            }
        }

        radioButtons.getUnchecked (2)->setToggleState (true, dontSendNotification);
    }
开发者ID:Neknail,项目名称:JUCE,代码行数:56,代码来源:LookAndFeelDemo.cpp


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