當前位置: 首頁>>代碼示例>>C++>>正文


C++ GetLayout函數代碼示例

本文整理匯總了C++中GetLayout函數的典型用法代碼示例。如果您正苦於以下問題:C++ GetLayout函數的具體用法?C++ GetLayout怎麽用?C++ GetLayout使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了GetLayout函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: GetWidget

Layout* LayoutItem::ParentLayout() const {
    if(GetWidget()) {
        return GetWidget()->ParentLayout();
    } else if(GetLayout()) {
        GetLayout()->ParentLayout();
    }
    return nullptr;
}
開發者ID:koalamrfan,項目名稱:koala,代碼行數:8,代碼來源:layout_item.cpp

示例2: _ValidateLayoutData

BSize
BBox::MaxSize()
{
	_ValidateLayoutData();

	BSize size = (GetLayout() ? GetLayout()->MaxSize() : fLayoutData->max);
	return BLayoutUtils::ComposeSize(ExplicitMaxSize(), size);
}
開發者ID:mmanley,項目名稱:Antares,代碼行數:8,代碼來源:Box.cpp

示例3: SetLayout

void Dialog::CompleteConstruction()
{
    Wnd::CompleteConstruction();

    SetLayout(GG::Wnd::Create<GG::Layout>(GG::X0, GG::Y0, GG::X1, GG::Y1, 1, 1, 2, 2));
    GetLayout()->SetColumnStretch(0, 1.0);
    //GetLayout()->SetRowStretch(0, 1.0);
    GetLayout()->Add(m_child, 0 , 0);
}
開發者ID:Vezzra,項目名稱:freeorion,代碼行數:9,代碼來源:Dialog.cpp

示例4: _ValidateLayoutData

BSize
BBox::PreferredSize()
{
	_ValidateLayoutData();

	BSize size = (GetLayout() ? GetLayout()->PreferredSize()
		: fLayoutData->preferred);
	return BLayoutUtils::ComposeSize(ExplicitPreferredSize(), size);
}
開發者ID:nielx,項目名稱:haiku-serviceskit,代碼行數:9,代碼來源:Box.cpp

示例5: switch

void
CamStatusView::MessageReceived(BMessage *message)
{
	switch (message->what) {
		case B_OBSERVER_NOTICE_CHANGE:
		{
			int32 what;
			message->FindInt32("be:observe_change_what", &what);
			switch (what) {
				case kMsgControllerCaptureStarted:
					SetRecording(true);
					break;
				case kMsgControllerCaptureStopped:
					if (fPaused)
						fPaused = false;
					SetRecording(false);
					break;
				case kMsgControllerCapturePaused:
				case kMsgControllerCaptureResumed:
					TogglePause(what == kMsgControllerCapturePaused);
					break;
				case kMsgControllerEncodeStarted:
					fEncodingStringView->SetText(kEncodingString);
					((BCardLayout*)GetLayout())->SetVisibleItem(1);		
					break;
				case kMsgControllerEncodeProgress:
				{
					int32 totalFrames = 0;
					if (message->FindInt32("frames_total", &totalFrames) == B_OK) {
						fStatusBar->SetMaxValue(float(totalFrames));
					}
					int32 remainingFrames = 0;
					if (message->FindInt32("frames_remaining", &remainingFrames) == B_OK) {
						BString string = kEncodingString;
						string << " (" << remainingFrames << " frames)";
						fEncodingStringView->SetText(string);
					}
					fStatusBar->Update(1);
					break;
				}
				case kMsgControllerEncodeFinished:
				{
					((BCardLayout*)GetLayout())->SetVisibleItem((int32)0);
					break;
				}
				default:
					break;
			}
			break;
		}
		
		default:
			BView::MessageReceived(message);
			break;
	}
}
開發者ID:jackburton79,項目名稱:bescreencapture,代碼行數:56,代碼來源:CamStatusView.cpp

示例6: if

bool LayoutItem::IsEmpty() const {
    if(GetWidget() && GetWidget()->IsVisible()) {
        return false;
    } else if(GetLayout() && !GetLayout()->IsEmpty()) {
        return false;
    } else if(GetLayoutSpace()) {
        return false;
    }
    return true;
}
開發者ID:koalamrfan,項目名稱:koala,代碼行數:10,代碼來源:layout_item.cpp

示例7: if

status_t
BSplitView::AllUnarchived(const BMessage* from)
{
	status_t err = BView::AllUnarchived(from);
	if (err == B_OK) {
		fSplitLayout = dynamic_cast<BSplitLayout*>(GetLayout());
		if (!fSplitLayout && GetLayout())
			return B_BAD_TYPE;
		else if (!fSplitLayout)
			return B_ERROR;
	}
	return err;
}
開發者ID:mmadia,項目名稱:Haiku-services-branch,代碼行數:13,代碼來源:SplitView.cpp

示例8: GetLayout

inline bool MtgCard::operator==(const MtgCard& rhs) {
    return GetLayout() == rhs.GetLayout() &&
            GetManacost() == rhs.GetManacost() &&
            GetCmc() == rhs.GetCmc() &&
            CompareStringList(GetColors(), rhs.GetColors()) &&
            type == rhs.type &&
            CompareStringList(GetSupertypes(), rhs.GetSupertypes()) &&
            CompareStringList(GetTypes(), rhs.GetTypes()) &&
            CompareStringList(GetSubtypes(), rhs.GetSubtypes()) &&
            GetRarity() == rhs.GetRarity() &&
            text == rhs.GetText() &&
            GetFlavor() == rhs.GetFlavor() &&
            GetArtist() == rhs.GetArtist() &&
            GetNumber() == rhs.GetNumber() &&
            GetPower() == rhs.GetPower() &&
            GetToughness() == rhs.GetToughness() &&
            GetLoyalty() == rhs.GetLoyalty() &&
            GetMultiverseid() == rhs.GetMultiverseid() &&
            CompareIntList(GetVariations(), rhs.GetVariations()) &&
            GetImageName() == rhs.GetImageName() &&
            GetWatermark() == rhs.GetWatermark() &&
            GetBorder() == rhs.GetBorder() &&
            IsTimeshifted() == rhs.IsTimeshifted() &&
            GetHand() == rhs.GetHand() &&
            GetLife() == rhs.GetLife() &&
            IsReserved() == rhs.IsReserved() &&
            GetReleasedate() == rhs.GetReleasedate() &&
            IsStarter() == rhs.IsStarter() &&
            CompareStringPairList(GetRulings(), rhs.GetRulings()) &&
            CompareStringPairList(GetForeignNames(), rhs.GetForeignNames()) &&
            GetOriginalText() == rhs.GetOriginalText() &&
            GetOriginalType() == rhs.GetOriginalType() &&
            CompareStringPairList(GetLegalities(), rhs.GetLegalities()) &&
            GetEdition() == rhs.GetEdition();
}
開發者ID:Nidhoegger,項目名稱:ManageMagic,代碼行數:35,代碼來源:MtgCard.cpp

示例9: GetLayout

/**
 * Function IsLayerVisible
 * tests whether a given layer is visible
 * @param aLayerIndex = The index of the layer to be tested
 * @return bool - true if the layer is visible.
 */
bool GERBVIEW_FRAME::IsLayerVisible( int aLayerIndex ) const
{
    if( ! m_DisplayOptions.m_IsPrinting )
        return m_LayersManager->IsLayerVisible( aLayerIndex );
    else
        return GetLayout()->IsLayerVisible( aLayerIndex );
}
開發者ID:james-sakalaukus,項目名稱:kicad,代碼行數:13,代碼來源:gerbview_frame.cpp

示例10: OnInitDialog

BOOL CBCGPRibbonItemDlg::OnInitDialog() 
{
	CBCGPDialog::OnInitDialog();

	CBCGPStaticLayout* pLayout = (CBCGPStaticLayout*)GetLayout ();
	if (pLayout != NULL)
	{
		pLayout->AddAnchor (IDC_BCGBARRES_IMAGE_LIST, CBCGPStaticLayout::e_MoveTypeNone, CBCGPStaticLayout::e_SizeTypeBoth, CSize(0, 0), CSize(100, 100));
		pLayout->AddAnchor (IDD_BCGBAR_RES_LABEL1, CBCGPStaticLayout::e_MoveTypeVert, CBCGPStaticLayout::e_SizeTypeNone, CSize(50, 100));
		pLayout->AddAnchor (IDC_BCGBARRES_NAME, CBCGPStaticLayout::e_MoveTypeVert, CBCGPStaticLayout::e_SizeTypeHorz, CSize(50, 100), CSize(100, 100));
		pLayout->AddAnchor (IDOK, CBCGPStaticLayout::e_MoveTypeBoth, CBCGPStaticLayout::e_SizeTypeNone, CSize(100, 100));
		pLayout->AddAnchor (IDCANCEL, CBCGPStaticLayout::e_MoveTypeBoth, CBCGPStaticLayout::e_SizeTypeNone, CSize(100, 100));
	}
	
	m_wndImageList.SetImages(&m_images);
	
	int nCount = m_images.GetCount ();

	for (int iImage = 0; iImage < nCount; iImage++)
	{
		CBCGPToolbarButton* pButton = new CBCGPToolbarButton;

		pButton->SetImage (iImage);

		m_wndImageList.AddButton (pButton);
		m_Buttons.AddTail (pButton);
	}

	m_wndImageList.SelectButton (m_iSelImage);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
開發者ID:iclosure,項目名稱:jframework,代碼行數:33,代碼來源:BCGPRibbonItemDlg.cpp

示例11: OnInitDialog

BOOL CBCGPGridFilterListDlg::OnInitDialog() 
{
	CBCGPDialog::OnInitDialog();

	CBCGPStaticLayout* pLayout = (CBCGPStaticLayout*)GetLayout();
	if (pLayout != NULL)
	{
		pLayout->AddAnchor(IDC_BCGBARRES_FILTER_SEARCH, CBCGPStaticLayout::e_MoveTypeNone, CBCGPStaticLayout::e_SizeTypeHorz);
		pLayout->AddAnchor(IDC_BCGBARRES_FILTER_LIST, CBCGPStaticLayout::e_MoveTypeNone, CBCGPStaticLayout::e_SizeTypeBoth);
		pLayout->AddAnchor(IDOK, CBCGPStaticLayout::e_MoveTypeBoth, CBCGPStaticLayout::e_SizeTypeNone);
		pLayout->AddAnchor(IDCANCEL, CBCGPStaticLayout::e_MoveTypeBoth, CBCGPStaticLayout::e_SizeTypeNone);
	}

	CString strPrompt;
	
	{
		CBCGPLocalResource locaRes;

		strPrompt.LoadString(IDS_BCGBARRES_SEARCH_PROMPT);
		m_strSelectAll.LoadString(IDS_BCGBARRES_SELECT_ALL);
	}

	m_wndEdit.EnableSearchMode(TRUE, strPrompt);

	FillList();

	m_wndEdit.SetFocus();
	return FALSE; // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
開發者ID:iclosure,項目名稱:jframework,代碼行數:30,代碼來源:BCGPGridFilterMenu.cpp

示例12: GetLayout

void
NotificationWindow::_LoadDisplaySettings(BMessage& settings)
{
	int32 setting;
	float originalWidth = fWidth;

	if (settings.FindFloat(kWidthName, &fWidth) != B_OK)
		fWidth = kDefaultWidth;
	if (originalWidth != fWidth)
		GetLayout()->SetExplicitSize(BSize(fWidth, B_SIZE_UNSET));

	if (settings.FindInt32(kIconSizeName, &setting) != B_OK)
		fIconSize = kDefaultIconSize;
	else
		fIconSize = (icon_size)setting;

	int32 position;
	if (settings.FindInt32(kNotificationPositionName, &position) != B_OK)
		fPosition = kDefaultNotificationPosition;
	else
		fPosition = position;

	// Notify the views about the change
	appview_t::iterator aIt;
	for (aIt = fAppViews.begin(); aIt != fAppViews.end(); ++aIt) {
		AppGroupView* view = aIt->second;
		view->Invalidate();
	}
}
開發者ID:looncraz,項目名稱:haiku,代碼行數:29,代碼來源:NotificationWindow.cpp

示例13: B_TRANSLATE_COMMENT

void
PartitionsPage::_BuildUI()
{
	BString text;
	text << B_TRANSLATE_COMMENT("Partitions", "Title") << "\n"
		<< B_TRANSLATE("The following partitions were detected. Please "
			"check the box next to the partitions to be included "
			"in the boot menu. You can also set the names of the "
			"partitions as you would like them to appear in the "
			"boot menu.");
	fDescription = CreateDescription("description", text);
	MakeHeading(fDescription);

	fPartitions = new BGridView("partitions", 0,
		be_control_look->DefaultItemSpacing() / 3);

	BLayoutBuilder::Grid<>(fPartitions)
		.SetInsets(B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING,
			B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING)
		.SetColumnWeight(0, 0)
		.SetColumnWeight(1, 1)
		.SetColumnWeight(2, 0.5)
		.SetColumnWeight(3, 0.5);
	_FillPartitionsView(fPartitions);

	BScrollView* scrollView = new BScrollView("scrollView", fPartitions, 0,
		false, true);

	SetLayout(new BGroupLayout(B_VERTICAL));

	BLayoutBuilder::Group<>((BGroupLayout*)GetLayout())
		.Add(fDescription)
		.Add(scrollView);
}
開發者ID:veer77,項目名稱:Haiku-services-branch,代碼行數:34,代碼來源:PartitionsPage.cpp

示例14: LoadXmlConfFile

void XaLibControllerFrontEnd::OnStart(const string& ConfFile) {

    try {

        LoadXmlConfFile(ConfFile);
        StartLog();

        LOG.Write("INF", __FILE__, __FUNCTION__,__LINE__,"########################### STARTING FRONT END ACTION LOG ############################");

        //StartDb();
        StartHttp();

        //GetServerInfo();
        //GetClientInfo();
        SESSION.FrontEndIp=HTTP.GetServerIpAddress();
        SESSION.ClientIp=HTTP.GetClientIpAddress();
        GetLayout();

        LOG.Write("INF", __FILE__, __FUNCTION__,__LINE__,"IP Address Client-> "+SESSION.ClientIp);
        LOG.Write("INF", __FILE__, __FUNCTION__,__LINE__,"Ip Address Front End Server -> "+SESSION.FrontEndIp);
        LOG.Write("INF", __FILE__, __FUNCTION__,__LINE__,"Read HttpString -> " + REQUEST.HeadersString);
        LOG.Write("INF", __FILE__, __FUNCTION__,__LINE__,"Request Language -> "+REQUEST.Language);
//		LOG.Write("INF", __FILE__, __FUNCTION__,__LINE__,"Request Device -> "+REQUEST.Device);

        //RESPONSE.ResponseType=REQUEST.ResponseType;

    } catch (int e) {

        throw;
    }
};
開發者ID:XAllegro,項目名稱:Xaas,代碼行數:31,代碼來源:XaLibControllerFrontEnd.cpp

示例15: GetGeometry

void MusicPaymentPreview::PreLayoutManagement()
{
  nux::Geometry const& geo = GetGeometry();
  GetLayout()->SetGeometry(geo);

  previews::Style& style = dash::previews::Style::Instance();

  int content_width = geo.width - style.GetPanelSplitWidth().CP(scale) - style.GetDetailsLeftMargin().CP(scale) - style.GetDetailsRightMargin().CP(scale);
  int width = std::max<int>(0, content_width);

  if(full_data_layout_) { full_data_layout_->SetMaximumWidth(width); }
  if(header_layout_) { header_layout_->SetMaximumWidth(width); }
  if(intro_) { intro_->SetMaximumWidth(width); }
  if(form_layout_) { form_layout_->SetMaximumWidth(width); }
  if(footer_layout_) { footer_layout_->SetMaximumWidth(width); }

  // set the tab ordering
  SetFirstInTabOrder(password_entry_->text_entry());
  SetLastInTabOrder(buttons_map_[MusicPaymentPreview::CANCEL_PURCHASE_ACTION].GetPointer());
  SetLastInTabOrder(buttons_map_[MusicPaymentPreview::PURCHASE_ALBUM_ACTION].GetPointer());
  SetLastInTabOrder(buttons_map_[MusicPaymentPreview::CHANGE_PAYMENT_ACTION].GetPointer());
  SetLastInTabOrder(buttons_map_[MusicPaymentPreview::FORGOT_PASSWORD_ACTION].GetPointer());

  Preview::PreLayoutManagement();
}
開發者ID:jonjahren,項目名稱:unity,代碼行數:25,代碼來源:MusicPaymentPreview.cpp


注:本文中的GetLayout函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。