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


C++ SetStyle函数代码示例

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


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

示例1: SetFamily

CharMapEntry::CharMapEntry(wxString family, wxString style, float size, wxUint32 encoding, wxUint32 code)
{
	SetFamily(family);
	SetStyle(style);
	SetSize(size);
	SetEncoding(encoding);
	SetCode(code);
}
开发者ID:robojan,项目名称:EMGL,代码行数:8,代码来源:charmap.cpp

示例2: DrawButtonText

void DrawButtonText(buttonT & button) {
    SetFont(BUTTON_FONT);
	SetStyle(BUTTON_STYLE);
    SetPointSize(BUTTON_POINT_SIZE);
    MovePen(button.x + (button.width - TextStringWidth(button.name)) / 2,
            button.y + (button.height + GetFontAscent()) / 2);
    DrawTextString(button.name);
}
开发者ID:Nikvand,项目名称:glass_bonus_challenge,代码行数:8,代码来源:gpathfinder.cpp

示例3: Create

void FFMODStudioStyle::Initialize()
{
	if (!StyleInstance.IsValid())
	{
		StyleInstance = Create();
	}

	SetStyle(StyleInstance.ToSharedRef());
}
开发者ID:Towkin,项目名称:DravenklovaUnreal,代码行数:9,代码来源:FMODStudioStyle.cpp

示例4: GetStyle

void CCoolTabCtrl::SetStyleAnimate(BOOL bEnable)
{
	UINT style = GetStyle();
	if(bEnable)
		style |= TCS_ANIMATE;
	else
		style &= ~TCS_ANIMATE;
	SetStyle(style);
}
开发者ID:JetC,项目名称:DigitalMap,代码行数:9,代码来源:CoolTabCtrl.cpp

示例5: NoWantFocus

SeparatorCtrl::SeparatorCtrl()
{
	NoWantFocus();
	Transparent();
	Disable();
	lmargin = rmargin = 2;
	size = 7;
	SetStyle(StyleDefault());
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:9,代码来源:Static.cpp

示例6: SetStyle

Button::Button(const WCHAR *s, Style *def, Style *mouseOver)
{
    text = NULL;
    wantedInputBits = (uint16)-1; // wants everything
    styleDefault = def;
    styleMouseOver = mouseOver;
    SetStyle(styleDefault);
    SetText(s);
}
开发者ID:Jens1970,项目名称:sumatrapdf,代码行数:9,代码来源:MuiButton.cpp

示例7: INFO

void Legend::SetCorners(boca::Rectangle<double> const& rectangle)
{
    INFO(rectangle.XMin(), rectangle.XMax(), rectangle.YMin(), rectangle.YMax());
    legend_.SetX1(rectangle.XMin());
    legend_.SetX2(rectangle.XMax());
    legend_.SetY1(rectangle.YMin());
    legend_.SetY2(rectangle.YMax());
    SetStyle();
}
开发者ID:Teddym0913,项目名称:BoCA,代码行数:9,代码来源:Legend.cpp

示例8: switch

void ImageActor::SetDefaultProperty( Property::Index index, const Property::Value& propertyValue )
{
  if(index < DEFAULT_RENDERABLE_ACTOR_PROPERTY_MAX_COUNT)
  {
    RenderableActor::SetDefaultProperty(index, propertyValue);
  }
  else
  {
    switch(index)
    {
      case Dali::ImageActor::PIXEL_AREA:
      {
        SetPixelArea(propertyValue.Get<Rect<int> >());
        break;
      }
      case Dali::ImageActor::FADE_IN:
      {
        SetFadeIn(propertyValue.Get<bool>());
        break;
      }
      case Dali::ImageActor::FADE_IN_DURATION:
      {
        SetFadeInDuration(propertyValue.Get<float>());
        break;
      }
      case Dali::ImageActor::STYLE:
      {
        SetStyle(StyleEnum(propertyValue.Get<std::string>()));
        break;
      }
      case Dali::ImageActor::BORDER:
      {
        SetNinePatchBorder( propertyValue.Get<Vector4>(), true /*in pixels*/ );
        break;
      }
      case Dali::ImageActor::IMAGE:
      {
        Dali::Image img = Scripting::NewImage( propertyValue );
        if(img)
        {
          SetImage( &GetImplementation(img) );
        }
        else
        {
          DALI_LOG_WARNING("Cannot create image from property value\n");
        }
        break;
      }
      default:
      {
        DALI_LOG_WARNING("Unknown property (%d)\n", index);
        break;
      }
    } // switch(index)

  } // else
}
开发者ID:Tarnyko,项目名称:dali-core,代码行数:57,代码来源:image-actor-impl.cpp

示例9: wls

void wls() 
{
    SetStyle();
    
    const int NUMENTRIES_water=60;
	// wavelength = 1240 [ev.nm] / E
    // 200 - 790 nm, every 10 nm
    double GeV = 1e9;
    double ENERGY_water[NUMENTRIES_water] = { 
        1.56962e-09*GeV, 1.58974e-09*GeV, 1.61039e-09*GeV, 1.63157e-09*GeV, 
        1.65333e-09*GeV, 1.67567e-09*GeV, 1.69863e-09*GeV, 1.72222e-09*GeV, 
        1.74647e-09*GeV, 1.77142e-09*GeV,1.7971e-09*GeV, 1.82352e-09*GeV, 
        1.85074e-09*GeV, 1.87878e-09*GeV, 1.90769e-09*GeV, 1.93749e-09*GeV, 
        1.96825e-09*GeV, 1.99999e-09*GeV, 2.03278e-09*GeV, 2.06666e-09*GeV,
        2.10169e-09*GeV, 2.13793e-09*GeV, 2.17543e-09*GeV, 2.21428e-09*GeV, 
        2.25454e-09*GeV, 2.29629e-09*GeV, 2.33962e-09*GeV, 2.38461e-09*GeV, 
        2.43137e-09*GeV, 2.47999e-09*GeV, 2.53061e-09*GeV, 2.58333e-09*GeV, 
        2.63829e-09*GeV, 2.69565e-09*GeV, 2.75555e-09*GeV, 2.81817e-09*GeV, 
        2.88371e-09*GeV, 2.95237e-09*GeV, 3.02438e-09*GeV, 3.09999e-09*GeV,
        3.17948e-09*GeV, 3.26315e-09*GeV, 3.35134e-09*GeV, 3.44444e-09*GeV, 
        3.54285e-09*GeV, 3.64705e-09*GeV, 3.75757e-09*GeV, 3.87499e-09*GeV, 
        3.99999e-09*GeV, 4.13332e-09*GeV, 4.27585e-09*GeV, 4.42856e-09*GeV, 
        4.59258e-09*GeV, 4.76922e-09*GeV, 4.95999e-09*GeV, 5.16665e-09*GeV, 
        5.39129e-09*GeV, 5.63635e-09*GeV, 5.90475e-09*GeV, 6.19998e-09*GeV 
    };
    double cm = 0.01.;
    double wls_abs_factor = 0.7;
    double wls_abs[NUMENTRIES_water]={
        1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 
        1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 
        1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 
        1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 
        1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 
        1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 
        1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 
        1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 0.0226002*wls_abs_factor*cm, 0.01*wls_abs_factor*cm, 
        0.01*wls_abs_factor*cm, 0.01*wls_abs_factor*cm, 0.01*wls_abs_factor*cm, 0.0170268*wls_abs_factor*cm, 0.0356053*wls_abs_factor*cm, 0.0634218*wls_abs_factor*cm, 
        0.156279*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm, 1e+09*wls_abs_factor*cm
    };
    
    double x[NUMENTRIES_water];
    double y[NUMENTRIES_water];
    for (int i=0; i<NUMENTRIES_water; i++) {
        x[i] = 1240/ENERGY_water[NUMENTRIES_water-1-i]; // nm
        y[i] = 1/wls_abs[NUMENTRIES_water-1-i];
        // y[i] = RAYLEIGH_water[NUMENTRIES_water-1-i];
    }
    
    TCanvas *c1 = new TCanvas("c1", "c1", 800, 600);
    TGraph *g1 = new TGraph(NUMENTRIES_water, x, y);
    g1->Draw("AL");
    // g1->GetYaxis()->SetRangeUser(0,0.01);
    g1->SetLineWidth(2);
    g1->GetXaxis()->SetTitle("Wavelength (nm)");
    g1->GetYaxis()->SetTitle("Arbitratry Unit");
    g1->SetTitle("PPO Absorption & Re-emission");
}
开发者ID:brettviren,项目名称:WbLS,代码行数:57,代码来源:wls.C

示例10: SetCommon

static void
SetCommon(
	GtkWidget	*widget,
	WidgetData	*data)
{
	SetState(widget,data->state);
	SetStyle(widget,data->style);
	gtk_widget_set_visible(widget,data->visible);
}
开发者ID:authorNari,项目名称:panda,代码行数:9,代码来源:widgetOPS.c

示例11: SetTexture

void ButtonComponent::ParseAttribute(const TiXmlAttribute* attribute)
{
	Component::ParseAttribute(attribute);
	if (IsEqual(attribute->Name(), "texture_focused"))
	{
		SetTexture(FOCUSED, attribute->Value());
	}
	else if (IsEqual(attribute->Name(), "texture_unfocused"))
	{
		SetTexture(UNFOCUSED, attribute->Value());
	}
	else if (IsEqual(attribute->Name(), "size"))
	{
		SetSize(ParseVector2f(attribute->Value()));
	}
	else if (IsEqual(attribute->Name(), "next_menu"))
	{
		m_nextMenu = attribute->Value();
	}
	else if (IsEqual(attribute->Name(), "type"))
	{
		SetType(GetTypeIndex(attribute->Value()));
	}
	else if (IsEqual(attribute->Name(), "style"))
	{
		SetStyle(GetStyleIndex(attribute->Value()));
	}
	else if (IsEqual(attribute->Name(), "text"))
	{
		SetText(attribute->Value());
	}
	else if (IsEqual(attribute->Name(), "text_font"))
	{
		SetTextFont(attribute->Value());
	}
	else if (IsEqual(attribute->Name(), "text_size"))
	{
		SetFontSize(attribute->UnsignedValue());
	}
	else if (IsEqual(attribute->Name(), "text_color"))
	{
		SetTextColor(ParseVector3f(attribute->Value()));
	}
	else if (IsEqual(attribute->Name(), "text_highlight_color"))
	{
		SetHighlightTextColor(ParseVector3f(attribute->Value()));
	}
	else if (IsEqual(attribute->Name(), "has_textures"))
	{
		SetIfHasTextures(attribute->BoolValue());
	}
	else if (IsEqual(attribute->Name(), "text_highlights"))
	{
		SetIfTextHighlights(attribute->BoolValue());
	}
}
开发者ID:PaulPopa,项目名称:Games,代码行数:56,代码来源:ButtonComponent.cpp

示例12: SetStyle

CWorkTab::CWorkTab()
{
	SetStyle(CContainer::SHADOW);
	SetALingTabs(CContainer::ALN_BOTTOM);
	m_deplaza = 0;
	m_btndesplaza.SetRectEmpty();
	bIniciaArrastre = FALSE;
	m_EnableL = FALSE;
	m_EnableR = FALSE;
}
开发者ID:axxapp,项目名称:winxgui,代码行数:10,代码来源:CWorkTab.cpp

示例13: ComputeButtonWidth

double ComputeButtonWidth(string name) {
	SaveGraphicsState();
    SetFont(BUTTON_FONT);
	SetStyle(BUTTON_STYLE);
    SetPointSize(BUTTON_POINT_SIZE);
	double width = 2 * BUTTON_MARGIN + TextStringWidth(name);
	RestoreGraphicsState();
	if (width < MIN_BUTTON_WIDTH) width = MIN_BUTTON_WIDTH;
	return width;
}
开发者ID:Nikvand,项目名称:glass_bonus_challenge,代码行数:10,代码来源:gpathfinder.cpp

示例14: Transparent

MultiButton::MultiButton()
{
	Transparent();
	SetStyle(StyleDefault());
	display = &StdDisplay();
	convert = &NoConvert();
	valuecy = Null;
	push = false;
	SetFrame(sNullFrame());
}
开发者ID:pedia,项目名称:raidget,代码行数:10,代码来源:MultiButton.cpp

示例15: SetStyle

/// Set the style definition and optionally update the display
bool wxRichTextFormattingDialog::SetStyleDefinition(const wxRichTextStyleDefinition& styleDef, wxRichTextStyleSheet* sheet, bool update)
{
    m_styleSheet = sheet;

    if (m_styleDefinition)
        delete m_styleDefinition;
    m_styleDefinition = styleDef.Clone();

    return SetStyle(m_styleDefinition->GetStyle(), update);
}
开发者ID:HanruZhou,项目名称:wxWidgets,代码行数:11,代码来源:richtextformatdlg.cpp


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