Exemplo n.º 1
0
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();
}
Exemplo n.º 3
0
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;
}
Exemplo n.º 4
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;	
	}
}
Exemplo n.º 6
0
//
// 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));
}
Exemplo n.º 7
0
StaticText::StaticText()
{
	NoWantFocus();
	IgnoreMouse();
	Transparent();
	SetAlign(ALIGN_LEFT);
}
Exemplo n.º 8
0
NS_IMETHODIMP
HTMLTableCellElement::SetAlign(const nsAString& aAlign)
{
  ErrorResult rv;
  SetAlign(aAlign, rv);
  return rv.StealNSResult();
}
Exemplo n.º 9
0
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);
}
Exemplo n.º 10
0
 /*****************************************************************************
 * 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;
 }
Exemplo n.º 11
0
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);
}
Exemplo n.º 12
0
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);
}
Exemplo n.º 13
0
PopUpInfo::PopUpInfo(): color(SColorInfo())
{
	Transparent(false);
	NoWantFocus();
	IgnoreMouse();
	SetAlign(ALIGN_CENTER);
	SetFrame(BlackFrame());
	opened = false;
}
Exemplo n.º 14
0
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);
}
Exemplo n.º 15
0
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();
}
Exemplo n.º 16
0
//
// 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);
}
Exemplo n.º 17
0
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;
}
Exemplo n.º 18
0
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());
}
Exemplo n.º 19
0
    /*****************************************************************************
    * 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()));
    }
Exemplo n.º 20
0
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;
}
Exemplo n.º 21
0
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();
}
Exemplo n.º 22
0
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);
}
Exemplo n.º 23
0
//
// 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);
	}
}
Exemplo n.º 24
0
void PopupMenu::Init() {
    SetClassName("PopupMenu");
    SetState(new ControlState);
    SetAlign(Center);
}
Exemplo n.º 25
0
BaseFormat& BaseFormat::operator<<(const fmt::Align& Manipulator)
{
    return SetAlign(Manipulator.GetValue());
}
Exemplo n.º 26
0
void PullrightMenu::Init() {
    SetClassName("PullrightMenu");
    SetAlign(TopRight);
}
Exemplo n.º 27
0
void PulldownMenu::Init() {
    SetClassName("PulldownMenu");
    SetAlign(BottomLeft);
}
Exemplo n.º 28
0
void UIStaticText::SetSpriteAlign(int32 align)
{
	SetAlign(align);
}
Exemplo n.º 29
0
BaseFormat& BaseFormat::operator<<(const fmt::RightAlign& Manipulator)
{
    return SetAlign(fmt::A_RIGHT);
}
Exemplo n.º 30
0
BaseFormat& BaseFormat::operator<<(const fmt::LeftAlign& Manipulator)
{
    return SetAlign(fmt::A_LEFT);
}