Exemplo n.º 1
0
//---------------------------------------------------------------------------
void __fastcall TOrdEntryForm::Delete1Click(TObject *Sender)
{
  if (RecState == rsNew) {
    ResetForm();
    return;
  }
  if (OvcVirtualListbox1->ItemIndex == -1) return;
  OvcNotebook1->PageIndex = 0;
  DataList->Delete(OvcVirtualListbox1->ItemIndex);
  OvcVirtualListbox1->NumItems--;
}
Exemplo n.º 2
0
void PS_ObjectDialog::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized)
{
    if (nState == WA_ACTIVE || nState == WA_CLICKACTIVE) {

//      TRACE("Activate PS_ObjectDialog %d\r\n", nState);

        DoFocusIn();
        ResetForm();
        controlScrollArea.Invalidate();
        controlScrollArea.UpdateWindow();
    }
    DialogShell::OnActivate(nState, pWndOther, bMinimized);
}
Exemplo n.º 3
0
//---------------------------------------------------------------------------
void __stdcall tTVPFlashOverlay::SetWindow(HWND wnd)
{
	if(Shutdown) return;
	OwnerWindow = wnd;
	try
	{
		if(Form)
			Form->SetFormParent(wnd);
		else
			ResetForm();
	}
	catch(Exception &e)
	{
		TVPThrowExceptionMessage(ttstr(("Cannot create Flash ActiveX control : " + e.Message).c_str()).c_str());
	}
	catch(...)
	{
		TVPThrowExceptionMessage(L"Cannot create window instance (Flash player ActiveX is not installed ?)");
	}
	return;
}
Exemplo n.º 4
0
ExposedList :: ExposedList(FuncObjC&        FOref,
                           const char*      mainT,
                           DSC_IndexMSSpec& msRef,
                           int              offVal,
                           SC_StringArray&  strRef) :
    ExposedObjC(FOref, mainT),
#ifndef ADCONSOLEAPP
    exposedMS(msRef),
#endif
    offsetVal(offVal),
    listData(strRef)
{
#ifndef ADCONSOLEAPP

    ArgListC args;


    if (exposedMS.enteredIndexIsSingle)
        {

            args.Clear();
            args.LeftPosAttach(2);
            args.RightPosAttach(98);
            args.BottomFormAttach();
            animRowForm.InitWidget(exposedObjectDialogForm.GetWidget(), args);

            // buttons
            args.Clear();
            args.LeftFormAttach();
            args.RightFormAttach();
            args.BottomFormAttach(2);

            animateButton.StdButtonInit("Animate", animRowForm.GetWidget(), args);
            animateButton.AddOtherObjectCallback(AnimButtonCB, this);

            args.Clear();
            args.LeftFormAttach();
            args.RightFormAttach();
            args.BottomBaseAttach(animRowForm);
            bottomRowForm.InitWidget(exposedObjectDialogForm.GetWidget(), args);

            args.Clear();
            args.BottomFormAttach(2);
            args.SetPlaceHolder();

            args.LeftPosAttach(2);
            args.RightPosAttach(48);
            toStartButton.StdButtonInit(" |<- ", bottomRowForm.GetWidget(), args);
            toStartButton.AddOtherObjectCallback(ToStartButtonCB, this);

            args.ResetPlace();
            args.LeftPosAttach(52);
            args.RightPosAttach(98);
            toEndButton.StdButtonInit(" ->| ", bottomRowForm.GetWidget(), args);
            toEndButton.AddOtherObjectCallback(ToEndButtonCB, this);

            // next row buttons
            args.Clear();
            args.LeftFormAttach();
            args.RightFormAttach();
            args.BottomBaseAttach(bottomRowForm);
            nextRowForm.InitWidget(exposedObjectDialogForm.GetWidget(), args);

            args.Clear();
            args.BottomFormAttach(2);
            args.SetPlaceHolder();

            args.LeftPosAttach(2);
            args.RightPosAttach(48);
            nextButton.StdButtonInit(" > ", nextRowForm.GetWidget(), args);
            nextButton.AddOtherObjectCallback(NextButtonCB, this);

            args.ResetPlace();
            args.LeftPosAttach(52);
            args.RightPosAttach(98);
            prevButton.StdButtonInit(" < ", nextRowForm.GetWidget(), args);
            prevButton.AddOtherObjectCallback(PrevButtonCB, this);

            args.Clear();
            args.LeftFormAttach();
            args.RightFormAttach();
            args.BottomBaseAttach(nextRowForm);
            toggleRowForm.InitWidget(exposedObjectDialogForm.GetWidget(), args);

            args.StdToggleSetup(5);
            startAnimAtZero.StdToggleInit("animate from start", toggleRowForm.GetWidget(), args);
            startAnimAtZero.SetValue(true);

            args.StdFormAttach(5);
            args.BottomWidgetAttach(toggleRowForm.GetWidget());
        }
    else
        {
            args.Clear();
            args.LeftPosAttach(2);
            args.RightPosAttach(98);
            args.BottomFormAttach();
            bottomRowForm.InitWidget(exposedObjectDialogForm.GetWidget(), args);

            args.Clear();
            args.LeftFormAttach();
            args.RightFormAttach();
            args.BottomFormAttach(2);

            applyButton.StdButtonInit(" Apply ", bottomRowForm.GetWidget(), args);
            applyButton.AddOtherObjectCallback(ApplyCB, this);

            // next row buttons
            args.Clear();
            args.LeftFormAttach();
            args.RightFormAttach();
            args.BottomBaseAttach(bottomRowForm);
            nextRowForm.InitWidget(exposedObjectDialogForm.GetWidget(), args);

            args.Clear();
            args.BottomFormAttach(2);
            args.SetPlaceHolder();

            args.LeftPosAttach(2);
            args.RightPosAttach(48);
            selectNoneButton.StdButtonInit(" None ", nextRowForm.GetWidget(), args);
            selectNoneButton.AddOtherObjectCallback(SelectNoneCB, this);

            args.ResetPlace();
            args.LeftPosAttach(52);
            args.RightPosAttach(98);
            selectAllButton.StdButtonInit(" All ", nextRowForm.GetWidget(), args);
            selectAllButton.AddOtherObjectCallback(SelectAllCB, this);

            args.StdFormAttach(10);
            args.BottomWidgetAttach(nextRowForm.GetWidget());
        }

    // list
    args.BottomOffset(5);
    scrolledList.isSingleSel = exposedMS.enteredIndexIsSingle;
    scrolledList.InitWidget(exposedObjectDialogForm.GetWidget(), args);
    scrolledList.AddOtherObjectCallback(ListChangeCB, this);

    SetForm(&exposedObjectDialogForm);
    ResetForm();

    SetAllSensitive();

    // set title
    Update();
#endif

}
Exemplo n.º 5
0
void PS_TransparencyDialog::DoCreateDialog(CWnd* pParentWnd)
{
    ArgListC args;
    CRect rect(0, 0, 350, 550);

    char plotName[80];
    base3DPlatform.GetMainWindowTitle(plotName, false, 80);
    ConcatString(plotName, "::Transparency", 80);

    CreateShell(pParentWnd, true, plotName, rect);
    CenterWindow();

    args.StdFormAttach();
    topRowForm.InitWidget(transparencyDialogForm.GetWidget(), args);

    args.StdToggleSetup(5);
    useTransparencyUI.StdToggleInit("Enable transparency", topRowForm.GetWidget(), args);
    useTransparencyUI.AddOtherObjectCallback(SetAllSensitiveCB, this);

    args.StdTopObjectAttach(topRowForm.GetWidget());
    groupForm.InitWidget(transparencyDialogForm.GetWidget(), args);

    args.StdFormAttach();
    for (int i = 0; i < PC_TransparencySpec::maxTransparencyGroup; i++)
    {
        char tempStr[80];
        ConcatInt(i + 1, "Group ", tempStr, 1, 80);
        transparencyGroupsUI[i].InitFramedUI(tempStr, groupForm.GetWidget(), args);
        args.StdTopObjectAttach(transparencyGroupsUI[i]);
    }

    // bottom row buttons
    args.Clear();
    args.LeftFormAttach();
    args.RightFormAttach();
    args.BottomFormAttach();
    bottomRowForm.InitWidget(transparencyDialogForm.GetWidget(), args);

    // animate
    args.StdSplitMiddle(2, 30);
    animateButton.StdButtonInit("Anim.", bottomRowForm.GetWidget(), args);
    animateButton.AddOtherObjectCallback(AnimateButtonCB, this);

    args.StdSplitMiddle(32, 64);
    applyButton.StdButtonInit("Apply", bottomRowForm.GetWidget(), args);
    applyButton.AddOtherObjectCallback(ApplyButtonCB, this);

    //  close
    args.StdSplitMiddle(66, 99);
    closeButton.StdButtonInit("Close", bottomRowForm.GetWidget(), args);
    closeButton.AddOtherObjectCallback(CloseButtonCB, this);

    // next row buttons
    args.Clear();
    args.LeftFormAttach();
    args.RightFormAttach();
    args.BottomBaseAttach(bottomRowForm);
    nextRowForm.InitWidget(transparencyDialogForm.GetWidget(), args);

    args.StdSplitMiddle(2, 30);
    stepButton.StdButtonInit("Step", nextRowForm.GetWidget(), args);
    stepButton.AddOtherObjectCallback(StepButtonCB, this);

    args.StdSplitMiddle(32, 64);
    startButton.StdButtonInit("Start", nextRowForm.GetWidget(), args);
    startButton.AddOtherObjectCallback(StartButtonCB, this);

    args.StdSplitMiddle(66, 98);
    endButton.StdButtonInit("End", nextRowForm.GetWidget(), args);
    endButton.AddOtherObjectCallback(EndButtonCB, this);

    // # of frames
    args.Clear();
    args.LeftFormAttach();
    args.RightFormAttach();
    args.BottomBaseAttach(nextRowForm);
    ntransStepsUI.SetFieldLen(5);
    ntransStepsUI.InitLabeledUI("# of frames", transparencyDialogForm.GetWidget(), args);

    SetForm(&transparencyDialogForm);
    ResetForm();
}