void PBImage::SetProperties(int properties) { SetAlign(properties); SetValign(properties); SetStretch(((properties & STRETCH) > 0)); SetTile(((properties & TILE) > 0)); }
NS_IMETHODIMP HTMLTableRowElement::SetAlign(const nsAString& aAlign) { ErrorResult rv; SetAlign(aAlign, rv); return rv.ErrorCode(); }
int TextWidget::Load(XmlSynthElem *elem) { SynthWidget::Load(elem); char *txt; if (elem->GetAttribute("lbl", &txt) == 0) { SetText(txt); delete txt; } if (elem->GetAttribute("fmt", &txt) == 0) { SetFormat(txt); delete txt; } short th; if (elem->GetAttribute("th", th) == 0) SetTextHeight(th); if (elem->GetAttribute("bold", th) == 0) SetBold(th); if (elem->GetAttribute("italic", th) == 0) SetItalic(th); if (elem->GetAttribute("filled", th) == 0) SetFilled(th); if (elem->GetAttribute("align", th) == 0) SetAlign(th); if (elem->GetAttribute("shadow", th) == 0) SetShadow(th); if (elem->GetAttribute("inset", th) == 0) SetInset(th); if (elem->GetAttribute("edit", th) == 0) editable = (int) th; return 0; }
int CEGPaneBar::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CControlBar::OnCreate(lpCreateStruct) == -1) return -1; SetAlign ( CBRS_BOTTOM ); return 0; }
PalettePanel::PalettePanel( wxWindow* parent, PalettePtr pal, wxWindowID eventsId /* wxID_ANY */): EditPanel( parent, eventsId ), mLeftPos(0, 0), mRightPos(1, 0), mContainerMode( pal != NULL ), mCurrentPal( pal ) { SetAllowScaling( false ); SetAllowEdit( false ); SetDrawFocus( false ); SetAlign( utdHCenter | utdVCenter ); SetBitmapScale( 12.0f ); SetGridEnabled(); SetGridLogic( wxCOPY ); if (!mContainerMode) { mCurrentPal = std::make_shared<Palette>(); mCurrentPal->Initiate( Palette::bppMono, (wxByte*) NULL ); SetBitmapFromPalette(); } else { mCurrentPal = pal; } }
// // User selected byte alignment radio button - enable byte align edit box, other stuff // void CAccessDialog::OnRAlignBytes() { // Enable the alignment controls. EnableMKBControls(&align_controls, TRUE); // Set the alignment in the access spec to the value shown in the alignment controls. SetAlign(GetMKBSpinners(&align_controls)); }
StaticText::StaticText() { NoWantFocus(); IgnoreMouse(); Transparent(); SetAlign(ALIGN_LEFT); }
NS_IMETHODIMP HTMLTableCellElement::SetAlign(const nsAString& aAlign) { ErrorResult rv; SetAlign(aAlign, rv); return rv.StealNSResult(); }
void CUIStaticItem::Init(LPCSTR tex, LPCSTR sh, float left, float top, u32 align) { uFlags.set(flValidRect, FALSE); CreateShader (tex,sh); SetPos (left,top); SetAlign (align); }
/***************************************************************************** * Function * DESCRIPTION: * Constructor *****************************************************************************/ UserIoSourceState::UserIoSourceState(Component* pParent) : ObserverText(pParent) { mStringIdCount = sizeof(mSourceIndexStringIds) / sizeof(SourceIndexStringId); SetAlign(GUI_TA_LEFT|GUI_TA_HCENTER); this->SetWordWrap(false); Languages::GetInstance()->Subscribe(this); mShowPrefix = false; }
void CUIFrameLine::Init(LPCSTR base_name, float x, float y, float size, bool horizontal, DWORD align) { SetPos (x, y); SetSize (size); SetAlign (align); SetOrientation (horizontal); InitTexture(base_name); }
CImage::CImage(CRenderer *renderer, const std::string& file_path, int x, int y, int rotation, int align, bool bShow) : CRenderBase(renderer), m_pSprite(NULL), m_pTexture(NULL) { SetFilePath(file_path); SetPos(x, y); SetRotation(rotation); SetAlign(align); SetShown(bShow); }
PopUpInfo::PopUpInfo(): color(SColorInfo()) { Transparent(false); NoWantFocus(); IgnoreMouse(); SetAlign(ALIGN_CENTER); SetFrame(BlackFrame()); opened = false; }
SaveChooser::SaveChooser(const char* type): ent(NewManaged<Gtk::Entry>()), fcb(NewManaged<Gtk::FileChooserButton>(_("Select a folder"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)) { // вариант с виджетом - слишком большой, хоть и более функциональный //Gtk::FileChooserWidget& fcw = NewManaged<Gtk::FileChooserWidget>(Gtk::FILE_CHOOSER_ACTION_SAVE); //Gtk::Frame& frm = PackStart(vbox, NewManagedFrame(Gtk::SHADOW_ETCHED_IN, " Output: "), Gtk::PACK_EXPAND_WIDGET); //Add(Add(frm, NewPaddingAlg(0, 5, 5, 5)), fcw); set_col_spacings(5); Gtk::Label& o_lbl = NewManaged<Gtk::Label>(type); SetAlign(o_lbl, true); attach(o_lbl, 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL); attach(ent, 1, 2, 0, 1); Gtk::Label& i_lbl = NewManaged<Gtk::Label>(_("in")); SetAlign(i_lbl, false); attach(i_lbl, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL); attach(fcb, 1, 2, 1, 2); }
void XWndEdit::Update() { auto pText = xGET_TEXT_CTRL( this, "__text.edit" ); if( pText ) { const auto sizeThis = GetSizeLocalNoTrans(); pText->SetSizeLocal( sizeThis ); pText->SetText( m_szString ); pText->SetAlign( XE::xALIGN_CENTER ); pText->SetbPassword( m_bPassword != FALSE ); } XWnd::Update(); }
// // User selected sector alignment radio button - disable byte align edit box, other stuff // void CAccessDialog::OnRAlignSector() { // Get the current alignment setting. DWORD old_align = GetAlign(); // Disable the alignment controls. EnableMKBControls(&align_controls, FALSE); // Set the alignment in the access spec to "sector". SetAlign(0); // Set the (disabled) alignment controls to the last value shown. SetMKBSpinners(&align_controls, old_align); }
bool CImage::UpdateImage(const std::string& file_path, int x, int y, int rotation, int align, bool bShow) { SetFilePath(file_path); SetPos(x, y); SetRotation(rotation); SetAlign(align); SetShown(bShow); ChangeResource(); return true; }
ConfigButton::ConfigButton(gui::Menu* owner, Action::ID action): gui::Button(owner, "", BUTTON_WIDTH, BUTTON_HEIGHT), m_action(action), m_error(false) { m_background.setTexture(Resources::getTexture("gui/button-config.png")); m_background.setTextureRect(sf::IntRect(0, 0, BUTTON_WIDTH, BUTTON_HEIGHT)); SetTextPadding(0, -2); SetAlign(gui::Align::CENTER); SetCallbackID(action); OnStateChanged(GetState()); }
/***************************************************************************** * Function - Constructor * DESCRIPTION: * *****************************************************************************/ DataPointTime::DataPointTime() { GUI_SetFont(*DEFAULT_FONT_11_LANGUAGE_INDEP); // Select Font to use SetClientArea(0,0,GUI_GetFontSizeY(),50); SetAlign(GUI_TA_LEFT + GUI_TA_BOTTOM); mSecCounter = 0; mShowColon = false; mColon = ' '; mLastColonPosition = -1; ActTime::GetInstance()->Subscribe(this); SetTime(*(ActTime::GetInstance())); }
Stockpile::Stockpile(seed::View* pView, int x, int y) : m_pView(pView) { SetPosition(Vector2((float)x + 1.f, (float)y + .5f)); auto pStockpileSprite = m_pView->CreateSprite("stockpile.png"); pStockpileSprite->SetScale(Vector2(SPRITE_SCALE)); pStockpileSprite->SetFilter(onut::SpriteBatch::eFiltering::Nearest); pStockpileSprite->SetAlign(Vector2::Zero); pStockpileSprite->SetPosition(Vector2(-2 - 16, -7 - 16 + 8) * SPRITE_SCALE); Attach(pStockpileSprite); m_pRockSprite = m_pView->CreateSprite("carryRock.png"); m_pRockSprite->SetScale(Vector2(.65f)); m_pRockSprite->SetFilter(onut::SpriteBatch::eFiltering::Nearest); m_pRockSprite->SetPosition(Vector2(8, 4)); pStockpileSprite->Attach(m_pRockSprite); m_pRockText = m_pView->CreateSpriteString("font.fnt"); m_pRockText->SetCaption("00"); m_pRockText->SetScale(Vector2(.5f)); m_pRockText->SetColor(Color::Black); m_pRockText->SetFilter(onut::SpriteBatch::eFiltering::Nearest); m_pRockText->SetPosition(Vector2(16, 4)); pStockpileSprite->Attach(m_pRockText); m_pWoodSprite = m_pView->CreateSprite("woodCarryH.png"); m_pWoodSprite->SetScale(Vector2(.65f)); m_pWoodSprite->SetFilter(onut::SpriteBatch::eFiltering::Nearest); m_pWoodSprite->SetPosition(Vector2(22, 4)); pStockpileSprite->Attach(m_pWoodSprite); m_pWoodText = m_pView->CreateSpriteString("font.fnt"); m_pWoodText->SetCaption("00"); m_pWoodText->SetScale(Vector2(.5f)); m_pWoodText->SetColor(Color::Black); m_pWoodText->SetFilter(onut::SpriteBatch::eFiltering::Nearest); m_pWoodText->SetPosition(Vector2(28, 4)); pStockpileSprite->Attach(m_pWoodText); auto pTile = g_gameView->GetTileAt(x, y); if (pTile) pTile->isOccupied = true; pTile = g_gameView->GetTileAt(x + 1, y); if (pTile) pTile->isOccupied = true; pView->CreateBoxPhysicsForNode(this, true); lightEnabled = true; lightRadius = 3.f; lightColor = Color::White * .5f; }
NAMESPACE_UPP HeaderCtrl::Column::Column() { ratio = 1; visible = true; min = 0; max = INT_MAX; margin = 4; header = NULL; SetAlign(ALIGN_LEFT); paper = Null; index = Null; NoWrap(); }
wxExColumn::wxExColumn( const wxString& name, wxExColumn::wxExColumnType type, int width) : wxListItem() , m_Type(type) , m_IsSortedAscending(false) { wxListColumnFormat align = wxLIST_FORMAT_RIGHT; switch (m_Type) { case wxExColumn::COL_FLOAT: align = wxLIST_FORMAT_RIGHT; if (width == 0) width = 80; break; case wxExColumn::COL_INT: align = wxLIST_FORMAT_RIGHT; if (width == 0) width = 60; break; case wxExColumn::COL_STRING: align = wxLIST_FORMAT_LEFT; if (width == 0) width = 100; break; case wxExColumn::COL_DATE: align = wxLIST_FORMAT_LEFT; if (width == 0) width = 150; break; default: wxFAIL; } SetColumn(-1); // default value, is set when inserting the col SetText(name); SetAlign(align); SetWidth(width); }
// // Calls each of the Set functions. // void CAccessDialog::SetAll(Access_Spec * spec) { SetSize(spec->size); SetAccess(spec->of_size); SetReads(spec->reads); SetRandom(spec->random); SetDelay(spec->delay); SetBurst(spec->burst); SetAlign(spec->align); EnableMKBControls(&align_controls, spec->align); if (!spec->align) { // Set the (disabled) alignment controls to 512 bytes (standard sector size). SetMKBSpinners(&align_controls, 512); } SetReply(spec->reply); EnableMKBControls(&reply_controls, spec->reply); if (!spec->reply) { // Set the (disabled) reply size controls to the current transfer size. SetMKBSpinners(&reply_controls, spec->size); } }
void PopupMenu::Init() { SetClassName("PopupMenu"); SetState(new ControlState); SetAlign(Center); }
BaseFormat& BaseFormat::operator<<(const fmt::Align& Manipulator) { return SetAlign(Manipulator.GetValue()); }
void PullrightMenu::Init() { SetClassName("PullrightMenu"); SetAlign(TopRight); }
void PulldownMenu::Init() { SetClassName("PulldownMenu"); SetAlign(BottomLeft); }
void UIStaticText::SetSpriteAlign(int32 align) { SetAlign(align); }
BaseFormat& BaseFormat::operator<<(const fmt::RightAlign& Manipulator) { return SetAlign(fmt::A_RIGHT); }
BaseFormat& BaseFormat::operator<<(const fmt::LeftAlign& Manipulator) { return SetAlign(fmt::A_LEFT); }