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


C++ Style函数代码示例

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


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

示例1: Style

void sToolBorder::OnLayoutChilds()
{
    if(Top)
        Inner.y0 += ReqSizeY;
    else
        Inner.y1 -= ReqSizeY;

    int pos = Client.x0;
    int y0 = Client.y0;
    int y1 = Client.y1;
    if(Top)
        y1 = y0+ReqSizeY-Style()->ToolBorderSize;
    else
        y0 = y1-ReqSizeY+Style()->ToolBorderSize;

    bool first = true;
    bool spaced = false;
    for(auto w : Childs)
    {
        if(!first && (w->Flags & sWF_GiveSpace) && !spaced)
            pos += Style()->Font->CellHeight;
        first = false;
        spaced = (w->Flags & sWF_GiveSpace)!=0;
        w->Outer.x0 = pos;
        pos += w->DecoratedSizeX;
        w->Outer.x1 = pos;
        w->Outer.y0 = y0;
        w->Outer.y1 = y1;
    }
}
开发者ID:CaineQT,项目名称:fr_public,代码行数:30,代码来源:Borders.cpp

示例2: switch

/*--------------------------------------------------------------------------*/
SIGNED PegPrompt::Message(const PegMessage &Mesg)
{
    switch(Mesg.wType)
    {
    case PM_CURRENT:
        PegThing::Message(Mesg);
        if (!(Style() & AF_TRANSPARENT))
        {
            Invalidate(mClip);
            Draw();
        }
        break;

    case PM_NONCURRENT:
        PegThing::Message(Mesg);
        if (!(Style() & AF_TRANSPARENT))
        {
            Invalidate(mClip);
            Draw();
        }
        break;

    default:
        PegThing::Message(Mesg);
        break;
    }
    return 0;
}
开发者ID:garyqinyu,项目名称:abv,代码行数:29,代码来源:pprompt.cpp

示例3: generateStyles

	virtual void generateStyles()
	{
		Style wayStyle = Style();
		wayStyle.color = Color(0.9f, 0.9f, 0.9f, 1.0f);
		wayStyle.casing_color = Color(0.0f, 0.0f, 0.0f, 1.0f);
		wayStyle.width = 10.0;
		wayStyle.casing_width = 1.0;

		wayStyle.text = "Keine Panik.";
		wayStyle.font_size = 8.0;
		wayStyle.text_color = Color(0.0f, 0.0f, 0.0f, 1.0f);
		wayStyle.text_halo_color = Color(1.0f, 0.0f, 0.0f, 0.3f);
		wayStyle.text_halo_radius = 1.0;
		wayStyle.text_position = Style::TextPosition::POSITION_LINE;
		styles[CachedString("line_se")] = wayStyle;
		styles[CachedString("line_ne")] = wayStyle;
		styles[CachedString("line_sw")] = wayStyle;
		styles[CachedString("line_nw")] = wayStyle;
		styles[CachedString("line_up")] = wayStyle;
		styles[CachedString("line_down")] = wayStyle;
		styles[CachedString("line_left")] = wayStyle;
		styles[CachedString("line_right")] = wayStyle;
		styles[CachedString("arc_1")] = wayStyle;
		styles[CachedString("arc_2")] = wayStyle;
		styles[CachedString("arc_3")] = wayStyle;

		wayStyle.text_position = Style::TextPosition::POSITION_CENTER;
		styles[CachedString("rect_1")] = wayStyle;

		Style nodeStyle = Style();
		Style nodeStyleDefault = Style();
		nodeStyleDefault.color = Color(1.0f, 0.0f, 0.0f, 1.0f);
		nodeStyleDefault.width = 2.0;
		nodeStyleDefault.text_color = Color(0.0f, 0.0f, 0.0f, 1.0f);
		nodeStyleDefault.text_position = Style::TextPosition::POSITION_CENTER;
		nodeStyleDefault.text = "Keine Panik.";
		nodeStyleDefault.font_size = 12.0;

		styles[CachedString("point_00")] = nodeStyleDefault;
		// too small
		nodeStyle = nodeStyleDefault;
		nodeStyle.font_size = 0.0;
		styles[CachedString("point_01")] = nodeStyle;
		// no text
		nodeStyle = nodeStyleDefault;
		nodeStyle.text = "";
		styles[CachedString("point_02")] = nodeStyle;
		// transparent color
		nodeStyle = nodeStyleDefault;
		nodeStyle.text_color = Color(0.0f, 0.0f, 0.0f, 0.0f);
		styles[CachedString("point_10")] = nodeStyle;

		nodeStyleDefault.text_halo_color = Color(0.0f, 1.0f, 1.0f, 1.0f);
		nodeStyleDefault.text_halo_radius = 2.0;
		styles[CachedString("point_11")] = nodeStyleDefault;
		// no halo radius
		nodeStyle = nodeStyleDefault;
		nodeStyleDefault.text_halo_radius = 0.0;
		styles[CachedString("point_12")] = nodeStyleDefault;
	}
开发者ID:AMDmi3,项目名称:alacarte,代码行数:60,代码来源:feature_test.cpp

示例4: view_module

void view_module(TString runNumber, Int_t iBar, Int_t iSide)
{
    TString inDir = "/Volumes/Data/kresan/s438b/data/";
    
    const Int_t fNofPMTs = 800;
    
    TString fileName = inDir + runNumber + "_raw_land.root";
    TFile *file = new TFile(fileName);
    char str[100];
    Int_t index = (Double_t)fNofPMTs / 2. * (iSide - 1) + iBar - 1;
    sprintf(str, "hTime_%d", index);
    TH1F *h1 = (TH1F*) file->Get(str);
    
    TPstyle();
    Style(h1, "TAC channel", "Time (ns)");
    h1->GetYaxis()->SetNdivisions(510);
    TCanvas *c1 = new TCanvas("c1", "", 10, 10, 500, 500);
    gPad->SetLeftMargin(0.15);
    gPad->SetRightMargin(0.05);
    h1->Draw();
    sprintf(str, "Bar: %3d, Side: %d", iBar, iSide);
    TPaveText *t1 = new TPaveText(0.192, 0.780, 0.623, 0.875, "NDC");
    t1->AddText(str);
    Style(t1);
    t1->Draw();
}
开发者ID:bl0x,项目名称:R3BRoot,代码行数:26,代码来源:view_tcal_par.C

示例5: Widget

    TextWidget::TextWidget(
        SUnit height, SVec p, Widget* parent, 
        const std::string& t,
        const SORE_Graphics::Color& c)
        : Widget(SVec(SUnit(), height), p, parent), color(c)
    {
        face = fontCache.Get(Style()["TextWidget"]["font"].asString());
        material = materialCache.Clone(Style()["TextWidget"]["material"].asString());

        SetText(t);
    }
开发者ID:thekidder,项目名称:taffy,代码行数:11,代码来源:sore_textwidget.cpp

示例6: r

void sToolBorder::OnPaint(int layer)
{
    if(Top)
    {
        sRect r(Outer);
        r.y1 = r.y0 + ReqSizeY;
        Style()->Rect(layer,this,sSK_ToolBorder_Top,r);
    }
    else
    {
        sRect r(Outer);
        r.y0 = r.y1 - ReqSizeY;
        Style()->Rect(layer,this,sSK_ToolBorder_Bottom,r);
    }
}
开发者ID:CaineQT,项目名称:fr_public,代码行数:15,代码来源:Borders.cpp

示例7: addStyle

/*!
  \internal
  Opens directory as a style.
*/
void MainWindow::openStyle()
{
    const QString path = QFileDialog::getExistingDirectory(this);
    if (path.isEmpty())
        return;
    addStyle(Style(path));
}
开发者ID:trollixx,项目名称:QuickControlsStyler,代码行数:11,代码来源:mainwindow.cpp

示例8: DoCreate

logical TButtonGroup :: DoCreate ( )
{
  OSButtonGroup      *obuttongroup = Style();
  logical             term = NO;
BEGINSEQ
  if ( TField::DoCreate() )                          ERROR

  if ( !complexWidget )
    if ( !(complexWidget = ComplexWidgetParent()->CreateSubWindow(elementStyle->get_sys_ident())) )
                                                     OADIERR(95)
  
  if ( complexWidget->CreateClientArea(elementStyle->GetControlName(),
                                       NO,
                                       elementStyle->get_displayLevel(),
                                       YES, 
                                       WT_ButtonGroup,obuttongroup->get_vertical(),
                                       obuttongroup->get_exclusive()) )
                                                     ERROR
  complexWidget->SetExtraData(this);
  
  if ( elementStyle->get_docking_area() )
    complexWidget->CreateDockingArea();

RECOVER
  term = YES;
ENDSEQ
  return(term);
}
开发者ID:BackupTheBerlios,项目名称:openaqua-svn,代码行数:28,代码来源:TButtonGroup.cpp

示例9: DoCreate

logical TWindow :: DoCreate ( )
{
  logical             term = NO;
BEGINSEQ
// 1,65 (44)
  if ( TField::DoCreate() )                          ERROR

statistics5.Start();
  if ( !complexWidget )
    if ( !(complexWidget = ComplexWidgetParent()->CreateSubWindow(elementStyle->get_sys_ident())) )
                                                     OADIERR(95)
  
  if ( complexWidget->CreateClientArea(elementStyle->GetControlName(),
                                       Style()->IsWorkspace(),
                                       elementStyle->get_displayLevel(),
                                       elementStyle->IsField() && frameStyle->IsSimpleWindow(),
                                       WT_Normal,NO,NO) )
                                                     ERROR
  complexWidget->SetExtraData(this);
  
  if ( elementStyle->get_docking_area() )
    complexWidget->CreateDockingArea();
  

RECOVER
  term = YES;
ENDSEQ
statistics5.Stop();
  return(term);
}
开发者ID:BackupTheBerlios,项目名称:openaqua-svn,代码行数:30,代码来源:TWindow.cpp

示例10: UseUpId

wxPanel * ShuttleGuiBase::StartPanel(int iStyle)
{
   UseUpId();
   if( mShuttleMode != eIsCreating )
      return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxPanel);
   wxPanel * pPanel;
   mpWind = pPanel = new wxPanel( mpParent, miId, wxDefaultPosition, wxDefaultSize,
      Style( wxNO_BORDER ));

   mpWind->SetBackgroundColour( 
      iStyle==0 
      ? wxColour( 190,200,230) :
      wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW) 
      );
   miProp=0;
   miBorder=2;
   UpdateSizers();  // adds window in to current sizer.

   // create a sizer within the window...
   mpParent = pPanel;
   mpSizer = new wxBoxSizer( wxVERTICAL );
   pPanel->SetSizer( mpSizer );
   PushSizer();
   return pPanel;
}
开发者ID:andreipaga,项目名称:audacity,代码行数:25,代码来源:ShuttleGui.cpp

示例11: wxFontPickerCtrl

/*! \brief    Build the control preview.
 *
 * \param parent wxWindow*    The parent window.
 * \param flags long                    The control flags.
 * \return wxObject*                     The constructed control.
 *
 */
wxObject* wxsFontPickerCtrl::OnBuildPreview(wxWindow* Parent,long Flags)
{
    wxFontPickerCtrl* Preview;
    wxFont fnt = m_fdFont.BuildFont();
    Preview = new wxFontPickerCtrl(Parent, GetId(), fnt, Pos(Parent), Size(Parent), Style());
    return SetupWindow(Preview,Flags);
}
开发者ID:WinterMute,项目名称:codeblocks_sf,代码行数:14,代码来源:wxsfontpickerctrl.cpp

示例12: Style

VOID Calendar::rebuild(BOOL reset_title)
{
	CTextStyle Style(database);

/* Extract the current styles. */

//	get_frame_style(&m_LabelFontStyle, SKELETON_PANEL, LABEL_FRAME_PANEL);
//	get_frame_style(&m_NumberFontStyle, DATE_PANEL, DATE_PANEL);

/* Delete what we rebuild. */

	Style.SetDefault();

	delete_skeleton_group(reset_title, &Style);
	delete_group(DATE_PANEL);

/* Do the construction. */

	calc_and_build(&Style);

/* Relayout the enhanced dates. */

	rebuild_dates(find_group(TEXT_PANEL));
	rebuild_dates(find_group(GRAPHIC_PANEL));
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:25,代码来源:CALBUILD.CPP

示例13: wxHtmlWindow

wxObject* wxsHtmlWindow::OnBuildPreview(wxWindow* Parent,long Flags)
{
    wxHtmlWindow* Preview = new wxHtmlWindow(Parent,GetId(),Pos(Parent),Size(Parent),Style());
    if ( Borders.Value )
    {
        Preview->SetBorders(Borders.GetPixels(Parent));
    }
    if ( !Url.empty() )
    {
        if ( Flags & pfExact )
        {
            Preview->LoadPage(Url);
        }
        else
        {
            Preview->SetPage(
                wxString(_T("<body><center>")) +
                _("Following url will be used:") +
                _T("<br>") + Url + _T("</center></body>"));
        }
    }
    else if ( !HtmlCode.empty() )
    {
        Preview->SetPage(HtmlCode);
    }

    return SetupWindow(Preview,Flags);
}
开发者ID:simple-codeblocks,项目名称:Codeblocks,代码行数:28,代码来源:wxshtmlwindow.cpp

示例14: wxPanel

wxObject* wxsPanel::OnBuildPreview(wxWindow* Parent,long Flags)
{
    wxWindow* NewItem = 0;
    if ( Flags & pfExact )
    {
        NewItem = new wxPanel(Parent,GetId(),Pos(Parent),Size(Parent),Style());
    }
    else
    {
        NewItem = new PanelPreview(Parent,GetId(),Pos(Parent),Size(Parent),Style(),IsRootItem());
    }
    NewItem->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
    SetupWindow(NewItem,Flags);
    AddChildrenPreview(NewItem,Flags);
    return NewItem;
}
开发者ID:469306621,项目名称:Languages,代码行数:16,代码来源:wxspanel.cpp

示例15: Update

		void Update ()
			{
			ForegroundFLD->Int (OrigREC,Foreground ());
			BackgroundFLD->Int (OrigREC,Background ());
			StyleFLD->Int (OrigREC,Style ());
			OrigREC->Name (Name ());
			}
开发者ID:bandi13,项目名称:RGIS,代码行数:7,代码来源:UISymbols.C


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