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


C++ JXWindow::GetBoundsHeight方法代码示例

本文整理汇总了C++中JXWindow::GetBoundsHeight方法的典型用法代码示例。如果您正苦于以下问题:C++ JXWindow::GetBoundsHeight方法的具体用法?C++ JXWindow::GetBoundsHeight怎么用?C++ JXWindow::GetBoundsHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JXWindow的用法示例。


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

示例1: JXVertPartition

void
SCFeedbackDirector::BuildWindow
(
    SCCircuitDocument* doc
)
{
    const SCCircuit* circuit = doc->GetCircuit();

    JArray<JCoordinate> heights(4);
    heights.AppendElement(kInitExprHeight);
    heights.AppendElement(kInitExprHeight);
    heights.AppendElement(kInitExprHeight);
    heights.AppendElement(kInitExprHeight);

    JArray<JCoordinate> minHeights(4);
    minHeights.AppendElement(kMinExprHeight);
    minHeights.AppendElement(kMinExprHeight);
    minHeights.AppendElement(kMinExprHeight);
    minHeights.AppendElement(kMinExprHeight);

// begin JXLayout

    JXWindow* window = new JXWindow(this, 360,520, "");
    assert( window != NULL );

    itsMainPartition =
        new JXVertPartition(heights, 0, minHeights, window,
                            JXWidget::kHElastic, JXWidget::kVElastic, 0,110, 365,415);
    assert( itsMainPartition != NULL );

    itsInputSource =
        new SCComponentMenu(circuit, SCACSourceFilter, "Input source:", window,
                            JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,20, 150,30);
    assert( itsInputSource != NULL );

    itsDepSource =
        new SCComponentMenu(circuit, SCDepSourceFilter, "Dependent source:", window,
                            JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,60, 150,30);
    assert( itsDepSource != NULL );

    itsEvalButton =
        new JXTextButton(JGetString("itsEvalButton::SCFeedbackDirector::JXLayout"), window,
                         JXWidget::kFixedRight, JXWidget::kFixedTop, 230,20, 80,20);
    assert( itsEvalButton != NULL );

    JXStaticText* layoutMessage =
        new JXStaticText(JGetString("layoutMessage::SCFeedbackDirector::JXLayout"), window,
                         JXWidget::kFixedRight, JXWidget::kFixedTop, 240,50, 110,60);
    assert( layoutMessage != NULL );

// end JXLayout

    const JCoordinate kMinWindowWidth = window->GetBoundsWidth();

    window->SetTitle("Feedback Theorem");
    window->SetMinSize(kMinWindowWidth, window->GetBoundsHeight());

    layoutMessage->SetText(
        "Output fn\nH0  |  Hinf\n T   |  Tn\nScratch area");

    itsInputSource->SetToPopupChoice(kJTrue);
    itsDepSource->SetToPopupChoice(kJTrue);

    ListenTo(itsEvalButton);

    // create sub-partitions

    const JCoordinate w =
        (itsMainPartition->GetBoundsWidth() - JPartition::kDragRegionSize)/2;
    JArray<JCoordinate> widths(2);
    widths.AppendElement(w);
    widths.AppendElement(w);

    const JCoordinate wMin = (kMinWindowWidth - JPartition::kDragRegionSize)/2;
    JArray<JCoordinate> minWidths(2);
    minWidths.AppendElement(wMin);
    minWidths.AppendElement(wMin);

    JXContainer* encl = itsMainPartition->GetCompartment(2);
    itsHPartition =
        new JXHorizPartition(widths, 0, minWidths, encl,
                             JXWidget::kHElastic, JXWidget::kVElastic,
                             0,0, encl->GetBoundsWidth(), encl->GetBoundsHeight());
    assert( itsHPartition != NULL );

    encl = itsMainPartition->GetCompartment(3);
    itsTPartition =
        new JXHorizPartition(widths, 0, minWidths, encl,
                             JXWidget::kHElastic, JXWidget::kVElastic,
                             0,0, encl->GetBoundsWidth(), encl->GetBoundsHeight());
    assert( itsTPartition != NULL );

    // create expressions

    SCExprEditorSet* exprSet =
        new SCExprEditorSet(doc, &itsOutputFn,
                            itsMainPartition->GetCompartment(1),
                            JXWidget::kHElastic, JXWidget::kVElastic,
                            0,0, 100,100);
    assert( exprSet != NULL );
//.........这里部分代码省略.........
开发者ID:jafl,项目名称:jx_application_framework,代码行数:101,代码来源:SCFeedbackDirector.cpp


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