本文整理汇总了C++中setTabStop函数的典型用法代码示例。如果您正苦于以下问题:C++ setTabStop函数的具体用法?C++ setTabStop怎么用?C++ setTabStop使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setTabStop函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: m_tsrc
GUITable::GUITable(gui::IGUIEnvironment *env,
gui::IGUIElement* parent, s32 id,
core::rect<s32> rectangle,
ISimpleTextureSource *tsrc
):
gui::IGUIElement(gui::EGUIET_ELEMENT, env, parent, id, rectangle),
m_tsrc(tsrc),
m_is_textlist(false),
m_has_tree_column(false),
m_selected(-1),
m_sel_column(0),
m_sel_doubleclick(false),
m_keynav_time(0),
m_keynav_buffer(L""),
m_border(true),
m_color(255, 255, 255, 255),
m_background(255, 0, 0, 0),
m_highlight(255, 70, 100, 50),
m_highlight_text(255, 255, 255, 255),
m_rowheight(1),
m_font(NULL),
m_scrollbar(NULL)
{
assert(tsrc != NULL);
gui::IGUISkin* skin = Environment->getSkin();
m_font = skin->getFont();
if (m_font) {
m_font->grab();
m_rowheight = m_font->getDimension(L"A").Height + 4;
m_rowheight = MYMAX(m_rowheight, 1);
}
const s32 s = skin->getSize(gui::EGDS_SCROLLBAR_SIZE);
m_scrollbar = Environment->addScrollBar(false,
core::rect<s32>(RelativeRect.getWidth() - s,
0,
RelativeRect.getWidth(),
RelativeRect.getHeight()),
this, -1);
m_scrollbar->setSubElement(true);
m_scrollbar->setTabStop(false);
m_scrollbar->setAlignment(gui::EGUIA_LOWERRIGHT, gui::EGUIA_LOWERRIGHT,
gui::EGUIA_UPPERLEFT, gui::EGUIA_LOWERRIGHT);
m_scrollbar->setVisible(false);
m_scrollbar->setPos(0);
setTabStop(true);
setTabOrder(-1);
updateAbsolutePosition();
core::rect<s32> relative_rect = m_scrollbar->getRelativePosition();
s32 width = (relative_rect.getWidth()/(2.0/3.0)) * porting::getDisplayDensity() *
g_settings->getFloat("gui_scaling");
m_scrollbar->setRelativePosition(core::rect<s32>(
relative_rect.LowerRightCorner.X-width,relative_rect.UpperLeftCorner.Y,
relative_rect.LowerRightCorner.X,relative_rect.LowerRightCorner.Y
));
}
示例2: Widget
ScrollBar::ScrollBar( Widget* parent, const Rect& rectangle,
bool horizontal, int id, bool noclip)
: Widget( parent, id, rectangle ),
_dragging(false), _isSliderHovered( false ), _lastSliderHovered( true ), _horizontal( horizontal ),
_draggedBySlider(false), _trayClick(false),
_overrideBgColorEnabled( false ), _visibleFilledArea( true ),
_overrideBgColor( 0 ), _value(0), _sliderPos(0), _lastSliderPos( 0 ),
_drawLenght(0), _minValue(0), _maxVallue(100),
_smallStep(10), _largeStep(50), _desiredPos(0), _lastTimeChange(0),
_d( new Impl )
{
_d->upButton = 0;
_d->downButton = 0;
_d->sliderPictureUp = Picture::load( ResourceGroup::panelBackground, 59 );
_d->sliderPictureDown = Picture::load( ResourceGroup::panelBackground, 51 );
#ifdef _DEBUG
setDebugName("ScrollBar");
#endif
refreshControls_();
setNotClipped(noclip);
// this element can be tabbed to
setTabStop(true);
setTabOrder(-1);
setPos(0);
}
示例3: LLUICtrl
LLTextBox::LLTextBox(const std::string& name, const std::string& text, F32 max_width,
const LLFontGL* font, BOOL mouse_opaque) :
LLUICtrl(name, LLRect(0, 0, 1, 1), mouse_opaque, NULL, NULL, FOLLOWS_LEFT | FOLLOWS_TOP),
mFontGL(font ? font : LLFontGL::sSansSerifSmall),
mTextColor(LLUI::sColorsGroup->getColor("LabelTextColor")),
mDisabledColor(LLUI::sColorsGroup->getColor("LabelDisabledColor")),
mBackgroundColor(LLUI::sColorsGroup->getColor("DefaultBackgroundColor")),
mBorderColor(LLUI::sColorsGroup->getColor("DefaultHighlightLight")),
mHoverColor( LLUI::sColorsGroup->getColor( "LabelSelectedColor" ) ),
mHoverActive( FALSE ),
mHasHover( FALSE ),
mBackgroundVisible(FALSE),
mBorderVisible(FALSE),
mFontStyle(LLFontGL::DROP_SHADOW_SOFT),
mBorderDropShadowVisible(FALSE),
mUseEllipses( FALSE ),
mHPad(0),
mVPad(0),
mHAlign(LLFontGL::LEFT),
mVAlign( LLFontGL::TOP ),
mClickedCallback(NULL),
mCallbackUserData(NULL)
{
setWrappedText(text, max_width);
reshapeToFitText();
setTabStop(FALSE);
}
示例4: LLUICtrl
LLTextBox::LLTextBox(const std::string& name_and_label, const LLRect& rect) :
LLUICtrl(name_and_label, rect, TRUE, NULL, NULL, FOLLOWS_LEFT | FOLLOWS_TOP),
mFontGL(LLFontGL::getFontSansSerifSmall())
{
initDefaults();
setText( name_and_label );
setTabStop(FALSE);
}
示例5: hasTabStop
void LLUICtrl::initFromXML(LLXMLNodePtr node, LLView* parent)
{
BOOL has_tab_stop = hasTabStop();
node->getAttributeBOOL("tab_stop", has_tab_stop);
setTabStop(has_tab_stop);
LLView::initFromXML(node, parent);
}
示例6: IGUIWindow
//! constructor
CGUIWindow::CGUIWindow(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
: IGUIWindow(environment, parent, id, rectangle), Dragging(false), IsDraggable(true), DrawBackground(true), DrawTitlebar(true), IsActive(false)
{
#ifdef _DEBUG
setDebugName("CGUIWindow");
#endif
IGUISkin* skin = 0;
if (environment)
skin = environment->getSkin();
CurrentIconColor = video::SColor(255,255,255,255);
s32 buttonw = 15;
if (skin)
{
buttonw = skin->getSize(EGDS_WINDOW_BUTTON_WIDTH);
}
s32 posx = RelativeRect.getWidth() - buttonw - 4;
CloseButton = Environment->addButton(core::rect<s32>(posx, 3, posx + buttonw, 3 + buttonw), this, -1,
L"", skin ? skin->getDefaultText(EGDT_WINDOW_CLOSE) : L"Close" );
CloseButton->setSubElement(true);
CloseButton->setTabStop(false);
CloseButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);
posx -= buttonw + 2;
RestoreButton = Environment->addButton(core::rect<s32>(posx, 3, posx + buttonw, 3 + buttonw), this, -1,
L"", skin ? skin->getDefaultText(EGDT_WINDOW_RESTORE) : L"Restore" );
RestoreButton->setVisible(false);
RestoreButton->setSubElement(true);
RestoreButton->setTabStop(false);
RestoreButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);
posx -= buttonw + 2;
MinButton = Environment->addButton(core::rect<s32>(posx, 3, posx + buttonw, 3 + buttonw), this, -1,
L"", skin ? skin->getDefaultText(EGDT_WINDOW_MINIMIZE) : L"Minimize" );
MinButton->setVisible(false);
MinButton->setSubElement(true);
MinButton->setTabStop(false);
MinButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);
MinButton->grab();
RestoreButton->grab();
CloseButton->grab();
// this element is a tab group
setTabGroup(true);
setTabStop(true);
setTabOrder(-1);
refreshSprites();
updateClientRect();
}
示例7: LLUICtrl
LLIconCtrl::LLIconCtrl(const std::string& name, const LLRect &rect, const LLUUID &image_id)
: LLUICtrl(name,
rect,
FALSE, // mouse opaque
NULL, NULL,
FOLLOWS_LEFT | FOLLOWS_TOP),
mColor( LLColor4::white )
{
setImage( image_id );
setTabStop(FALSE);
}
示例8: LLCheckBoxCtrl
LLRadioCtrl::LLRadioCtrl(const std::string& name, const LLRect& rect, const std::string& label, const std::string& value, const LLFontGL* font, commit_callback_t commit_callback)
: LLCheckBoxCtrl(name, rect, label, font, commit_callback, FALSE, RADIO_STYLE),
mPayload(value)
{
setTabStop(FALSE);
// use name as default "Value" for backwards compatibility
if (value.empty())
{
mPayload = name;
}
}
示例9: IGUICheckBox
//! constructor
CGUICheckBox::CGUICheckBox(bool checked, IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
: IGUICheckBox(environment, parent, id, rectangle), checkTime(0), Pressed(false), Checked(checked)
{
#ifdef _DEBUG
setDebugName("CGUICheckBox");
#endif
// this element can be tabbed into
setTabStop(true);
setTabOrder(-1);
}
示例10: IGUIComboBox
//! constructor
CGUIComboBox::CGUIComboBox(IGUIEnvironment* environment, IGUIElement* parent,
s32 id, core::rect<s32> rectangle)
: IGUIComboBox(environment, parent, id, rectangle),
ListButton(0), SelectedText(0), ListBox(0), LastFocus(0),
Selected(-1), HAlign(EGUIA_UPPERLEFT), VAlign(EGUIA_CENTER), MaxSelectionRows(5), HasFocus(false),
ActiveFont(0)
{
#ifdef _DEBUG
setDebugName("CGUIComboBox");
#endif
IGUISkin* skin = Environment->getSkin();
s32 width = 15;
if (skin)
width = skin->getSize(EGDS_WINDOW_BUTTON_WIDTH);
core::rect<s32> r;
r.UpperLeftCorner.X = rectangle.getWidth() - width - 2;
r.LowerRightCorner.X = rectangle.getWidth() - 2;
r.UpperLeftCorner.Y = 2;
r.LowerRightCorner.Y = rectangle.getHeight() - 2;
ListButton = Environment->addButton(r, this, -1, L"");
if (skin && skin->getSpriteBank())
{
ListButton->setSpriteBank(skin->getSpriteBank());
ListButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_DOWN), skin->getColor(EGDC_WINDOW_SYMBOL));
ListButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_DOWN), skin->getColor(EGDC_WINDOW_SYMBOL));
}
ListButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT);
ListButton->setSubElement(true);
ListButton->setTabStop(false);
r.UpperLeftCorner.X = 2;
r.UpperLeftCorner.Y = 2;
r.LowerRightCorner.X = RelativeRect.getWidth() - (ListButton->getAbsolutePosition().getWidth() + 2);
r.LowerRightCorner.Y = RelativeRect.getHeight() - 2;
SelectedText = Environment->addStaticText(L"", r, false, false, this, -1, false);
SelectedText->setSubElement(true);
SelectedText->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT);
SelectedText->setTextAlignment(EGUIA_UPPERLEFT, EGUIA_CENTER);
if (skin)
SelectedText->setOverrideColor(skin->getColor(EGDC_BUTTON_TEXT));
SelectedText->enableOverrideColor(true);
// this element can be tabbed to
setTabStop(true);
setTabOrder(-1);
}
示例11: LLUICtrl
LLIconCtrl::LLIconCtrl(const LLString& name, const LLRect &rect, const LLString &image_name)
: LLUICtrl(name,
rect,
FALSE, // mouse opaque
NULL, NULL,
FOLLOWS_LEFT | FOLLOWS_TOP),
mColor( LLColor4::white ),
mImageName(image_name)
{
LLUUID image_id;
image_id.set(LLUI::sAssetsGroup->getString( image_name ));
setImage( image_id );
setTabStop(FALSE);
}
示例12: LLUICtrl
LLIconCtrl::LLIconCtrl(const std::string& name, const LLRect &rect, const std::string &image_name, const S32& min_width, const S32& min_height)
: LLUICtrl(name,
rect,
FALSE, // mouse opaque
NULL,
FOLLOWS_LEFT | FOLLOWS_TOP),
mColor( LLColor4::white ),
mPriority(0),
mMinWidth(min_width),
mMinHeight(min_height)
{
setValue( image_name );
setTabStop(FALSE);
}
示例13: setIsChrome
void LLPanel::init()
{
// mRectControl
mBgColorAlpha = LLUI::sColorsGroup->getColor( "DefaultBackgroundColor" );
mBgColorOpaque = LLUI::sColorsGroup->getColor( "FocusBackgroundColor" );
mDefaultBtnHighlight = LLUI::sColorsGroup->getColor( "DefaultHighlightLight" );
mBgVisible = FALSE;
mBgOpaque = FALSE;
mBorder = NULL;
mDefaultBtn = NULL;
setIsChrome(FALSE); //is this a decorator to a live window or a form?
setTabStop(FALSE);
mVisibleSignal = NULL;
}
示例14: IGUIButton
//! constructor
CGUIButton::CGUIButton(IGUIEnvironment* environment, IGUIElement* parent,
s32 id, core::rect<s32> rectangle, bool noclip)
: IGUIButton(environment, parent, id, rectangle),
SpriteBank(0), OverrideFont(0),
ClickTime(0), HoverTime(0), FocusTime(0),
IsPushButton(false), Pressed(false),
UseAlphaChannel(false), DrawBorder(true), ScaleImage(false)
{
#ifdef _DEBUG
setDebugName("CGUIButton");
#endif
setNotClipped(noclip);
// This element can be tabbed.
setTabStop(true);
setTabOrder(-1);
}
示例15: IGUIButton
//! constructor
CGUIButton::CGUIButton(IGUIEnvironment* environment, IGUIElement* parent,
s32 id, core::rect<s32> rectangle, bool noclip)
: IGUIButton(environment, parent, id, rectangle), Pressed(false),
IsPushButton(false), UseAlphaChannel(false), Border(true),
ClickTime(0), SpriteBank(0), OverrideFont(0), Image(0), PressedImage(0)
{
#ifdef _DEBUG
setDebugName("CGUIButton");
#endif
setNotClipped(noclip);
// Initialize the sprites.
for (u32 i=0; i<EGBS_COUNT; ++i)
ButtonSprites[i].Index = -1;
// This element can be tabbed.
setTabStop(true);
setTabOrder(-1);
}