FileDialog custom controls · dotnet/wpf@2e7aab3 (original) (raw)

`@@ -379,6 +379,65 @@ internal interface IShellLinkW

`

379

379

`void SetPath([MarshalAs(UnmanagedType.LPWStr)] string pszFile);

`

380

380

`}

`

381

381

``

``

382

`+

[

`

``

383

`+

ComImport,

`

``

384

`+

InterfaceType(ComInterfaceType.InterfaceIsIUnknown),

`

``

385

`+

Guid(IID.FileDialogCustomize),

`

``

386

`+

]

`

``

387

`+

internal interface IFileDialogCustomize

`

``

388

`+

{

`

``

389

`+

void EnableOpenDropDown(int dwIDCtl);

`

``

390

`+

void AddMenu(int dwIDCtl, [MarshalAs(UnmanagedType.LPWStr)] string pszLabel);

`

``

391

`+

void AddPushButton(int dwIDCtl, [In, MarshalAs(UnmanagedType.LPWStr)] string pszLabel);

`

``

392

`+

void AddComboBox(int dwIDCtl);

`

``

393

`+

void AddRadioButtonList(int dwIDCtl);

`

``

394

`+

void AddCheckButton(int dwIDCtl, [MarshalAs(UnmanagedType.LPWStr)] string pszLabel, bool bChecked);

`

``

395

`+

void AddEditBox(int dwIDCtl, [MarshalAs(UnmanagedType.LPWStr)] string pszText);

`

``

396

`+

void AddSeparator(int dwIDCtl);

`

``

397

`+

void AddText(int dwIDCtl, [MarshalAs(UnmanagedType.LPWStr)] string pszText);

`

``

398

`+

void SetControlLabel(int dwIDCtl, [MarshalAs(UnmanagedType.LPWStr)] string pszLabel);

`

``

399

`+

CDCS GetControlState(int dwIDCtl);

`

``

400

`+

void SetControlState(int dwIDCtl, CDCS dwState);

`

``

401

`+

[return:MarshalAs(UnmanagedType.LPWStr)]

`

``

402

`+

string GetEditBoxText(int dwIDCtl);

`

``

403

`+

void SetEditBoxText(int dwIDCtl, [MarshalAs(UnmanagedType.LPWStr)] string pszText);

`

``

404

`+

[return:MarshalAs(UnmanagedType.Bool)]

`

``

405

`+

bool GetCheckButtonState(int dwIDCtl);

`

``

406

`+

void SetCheckButtonState(int dwIDCtl, bool bChecked);

`

``

407

`+

void AddControlItem(int dwIDCtl, int dwIDItem, [MarshalAs(UnmanagedType.LPWStr)] string pszLabel);

`

``

408

`+

void RemoveControlItem(int dwIDCtl, int dwIDItem);

`

``

409

`+

void RemoveAllControlItems(int dwIDCtl);

`

``

410

`+

CDCS GetControlItemState(int dwIDCtl, int dwIDItem);

`

``

411

`+

void SetControlItemState(int dwIDCtl, int dwIDItem, CDCS dwState);

`

``

412

`+

[PreserveSig]

`

``

413

`+

HRESULT GetSelectedControlItem(int dwIDCtl, out int dwIDItem);

`

``

414

`+

void SetSelectedControlItem(int dwIDCtl, int dwIDItem);

`

``

415

`+

void StartVisualGroup(int dwIDCtl, [MarshalAs(UnmanagedType.LPWStr)] string pszLabel);

`

``

416

`+

void EndVisualGroup();

`

``

417

`+

void MakeProminent(int dwIDCtl);

`

``

418

`+

void SetControlItemText(int dwIDCtl, int dwIDItem, [MarshalAs(UnmanagedType.LPWStr)] string pszLabel);

`

``

419

`+

}

`

``

420

+

``

421

`+

[

`

``

422

`+

ComImport,

`

``

423

`+

InterfaceType(ComInterfaceType.InterfaceIsIUnknown),

`

``

424

`+

Guid(IID.FileDialogControlEvents),

`

``

425

`+

]

`

``

426

`+

internal interface IFileDialogControlEvents

`

``

427

`+

{

`

``

428

`+

[PreserveSig]

`

``

429

`+

HRESULT OnItemSelected(IFileDialogCustomize pfdc, int dwIDCtl, int dwIDItem);

`

``

430

+

``

431

`+

[PreserveSig]

`

``

432

`+

HRESULT OnButtonClicked(IFileDialogCustomize pfdc, int dwIDCtl);

`

``

433

+

``

434

`+

[PreserveSig]

`

``

435

`+

HRESULT OnCheckButtonToggled(IFileDialogCustomize pfdc, int dwIDCtl, bool bChecked);

`

``

436

+

``

437

`+

[PreserveSig]

`

``

438

`+

HRESULT OnControlActivating(IFileDialogCustomize pfdc, int dwIDCtl);

`

``

439

`+

}

`

``

440

+

382

441

`[

`

383

442

`ComImport,

`

384

443

`InterfaceType(ComInterfaceType.InterfaceIsIUnknown),

`

`@@ -479,6 +538,73 @@ internal interface IFileDialog : IModalWindow

`

479

538

`void SetFilter([MarshalAs(UnmanagedType.Interface)] object pFilter);

`

480

539

`}

`

481

540

``

``

541

`+

[

`

``

542

`+

ComImport,

`

``

543

`+

InterfaceType(ComInterfaceType.InterfaceIsIUnknown),

`

``

544

`+

Guid(IID.FileDialog2),

`

``

545

`+

]

`

``

546

`+

internal interface IFileDialog2 : IFileDialog

`

``

547

`+

{

`

``

548

`+

#region IFileDialog redeclarations

`

``

549

`+

#region IModalWindow redeclarations

`

``

550

`+

[PreserveSig]

`

``

551

`+

new HRESULT Show(IntPtr parent);

`

``

552

`+

#endregion

`

``

553

+

``

554

`+

new void SetFileTypes(uint cFileTypes, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] COMDLG_FILTERSPEC[] rgFilterSpec);

`

``

555

+

``

556

`+

new void SetFileTypeIndex(uint iFileType);

`

``

557

+

``

558

`+

new uint GetFileTypeIndex();

`

``

559

+

``

560

`+

new uint Advise(IFileDialogEvents pfde);

`

``

561

+

``

562

`+

new void Unadvise(uint dwCookie);

`

``

563

+

``

564

`+

new void SetOptions(FOS fos);

`

``

565

+

``

566

`+

new FOS GetOptions();

`

``

567

+

``

568

`+

new void SetDefaultFolder(IShellItem psi);

`

``

569

+

``

570

`+

new void SetFolder(IShellItem psi);

`

``

571

+

``

572

`+

new IShellItem GetFolder();

`

``

573

+

``

574

`+

new IShellItem GetCurrentSelection();

`

``

575

+

``

576

`+

new void SetFileName([MarshalAs(UnmanagedType.LPWStr)] string pszName);

`

``

577

+

``

578

`+

[return: MarshalAs(UnmanagedType.LPWStr)]

`

``

579

`+

new string GetFileName();

`

``

580

+

``

581

`+

new void SetTitle([MarshalAs(UnmanagedType.LPWStr)] string pszTitle);

`

``

582

+

``

583

`+

new void SetOkButtonLabel([MarshalAs(UnmanagedType.LPWStr)] string pszText);

`

``

584

+

``

585

`+

new void SetFileNameLabel([MarshalAs(UnmanagedType.LPWStr)] string pszLabel);

`

``

586

+

``

587

`+

new IShellItem GetResult();

`

``

588

+

``

589

`+

new void AddPlace(IShellItem psi, FDAP alignment);

`

``

590

+

``

591

`+

new void SetDefaultExtension([MarshalAs(UnmanagedType.LPWStr)] string pszDefaultExtension);

`

``

592

+

``

593

`+

new void Close([MarshalAs(UnmanagedType.Error)] int hr);

`

``

594

+

``

595

`+

new void SetClientGuid([In] ref Guid guid);

`

``

596

+

``

597

`+

new void ClearClientData();

`

``

598

+

``

599

`+

new void SetFilter([MarshalAs(UnmanagedType.Interface)] object pFilter);

`

``

600

`+

#endregion

`

``

601

+

``

602

`+

void SetCancelButtonLabel([MarshalAs(UnmanagedType.LPWStr)] string pszLabel);

`

``

603

+

``

604

`+

void SetNavigationRoot(IShellItem psi);

`

``

605

`+

}

`

``

606

+

``

607

+

482

608

`[

`

483

609

`ComImport,

`

484

610

`InterfaceType(ComInterfaceType.InterfaceIsIUnknown),

`