PrintDialog.cs :  » GUI » wx-NET » wx » C# / CSharp Open Source

Home
C# / CSharp Open Source
1.2.6.4 mono .net core
2.2.6.4 mono core
3.Aspect Oriented Frameworks
4.Bloggers
5.Build Systems
6.Business Application
7.Charting Reporting Tools
8.Chat Servers
9.Code Coverage Tools
10.Content Management Systems CMS
11.CRM ERP
12.Database
13.Development
14.Email
15.Forum
16.Game
17.GIS
18.GUI
19.IDEs
20.Installers Generators
21.Inversion of Control Dependency Injection
22.Issue Tracking
23.Logging Tools
24.Message
25.Mobile
26.Network Clients
27.Network Servers
28.Office
29.PDF
30.Persistence Frameworks
31.Portals
32.Profilers
33.Project Management
34.RSS RDF
35.Rule Engines
36.Script
37.Search Engines
38.Sound Audio
39.Source Control
40.SQL Clients
41.Template Engines
42.Testing
43.UML
44.Web Frameworks
45.Web Service
46.Web Testing
47.Wiki Engines
48.Windows Presentation Foundation
49.Workflows
50.XML Parsers
C# / C Sharp
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source » GUI » wx NET 
wx NET » wx » PrintDialog.cs
//-----------------------------------------------------------------------------
// wx.NET - PrintDialog.cs
//
// The wxPrintDialog wrapper classes.
//
// Written by Bryan Bulten (bryan@bulten.ca)
// (C) 2003 Bryan Bulten
// Licensed under the wxWidgets license, see LICENSE.txt for details.
//
// $Id: PrintDialog.cs,v 1.7 2006/10/20 05:51:31 stahta01 Exp $
//-----------------------------------------------------------------------------

using System;
using System.Drawing;
using System.Runtime.InteropServices;

namespace wx{
    public class PageSetupDialog : Object // HMaH: Fix - this is not a wx.Dialog
    {
        [DllImport("wx-c")] static extern IntPtr wxPageSetupDialog_ctor(IntPtr parent, IntPtr data);
        [DllImport("wx-c")] static extern IntPtr wxPageSetupDialog_GetPageSetupData(IntPtr self);
        // HMaH: Fix - This is not a wx.dialog. So, ShowModal has to be wrapped for this dialog again.
        [DllImport("wx-c")] static extern int wxPageSetupDialog_ShowModal(IntPtr self);

        //-----------------------------------------------------------------------------

        internal PageSetupDialog(IntPtr wxObject)
            : base(wxObject) { }

        public PageSetupDialog(Window parent)
            : this(parent, null) { }
        public PageSetupDialog(Window parent, PageSetupDialogData data)
            : this(wxPageSetupDialog_ctor(Object.SafePtr(parent), Object.SafePtr(data))) { }

        //-----------------------------------------------------------------------------

        public PageSetupDialogData PageSetupData
        {
            get { return (PageSetupDialogData)FindObject(wxPageSetupDialog_GetPageSetupData(wxObject), typeof(PageSetupDialogData)); }
        }

        /** Shows the dialog, returning wx.Window.wxID_OK if the user pressed OK, and wx.Window.wxID_CANCEL otherwise.
         * Please note, that this is not a wx.Dialog.
        */
        public int ShowModal()
        {
            return wxPageSetupDialog_ShowModal(wxObject);
        }
    }

    public class PrintDialog : Object // HMaH: Fix - this is not a wx.Dialog
    {
        [DllImport("wx-c")] static extern IntPtr wxPrintDialog_ctor(IntPtr parent, IntPtr data);
        [DllImport("wx-c")] static extern IntPtr wxPrintDialog_ctorPrintData(IntPtr parent, IntPtr data);
        [DllImport("wx-c")] static extern IntPtr wxPrintDialog_GetPrintData(IntPtr self);
        [DllImport("wx-c")] static extern IntPtr wxPrintDialog_GetPrintDialogData(IntPtr self);
        [DllImport("wx-c")] static extern IntPtr wxPrintDialog_GetPrintDC(IntPtr self);
        // HMaH: Fix - This is not a wx.dialog. So, ShowModal has to be wrapped for this dialog again.
        [DllImport("wx-c")] static extern int wxPrintDialog_ShowModal(IntPtr self);

        //-----------------------------------------------------------------------------

        internal PrintDialog(IntPtr wxObject)
            : base(wxObject) { }

        public PrintDialog(Window parent)
            : this(parent, (PrintDialogData)null) { }
        public PrintDialog(Window parent, PrintDialogData data)
            : this(wxPrintDialog_ctor(Object.SafePtr(parent), Object.SafePtr(data))) { }

        public PrintDialog(Window parent, PrintData data)
            : this(wxPrintDialog_ctorPrintData(Object.SafePtr(parent), Object.SafePtr(data))) { }

        //-----------------------------------------------------------------------------

        public PrintData PrintData
        {
            get { return (PrintData)FindObject(wxPrintDialog_GetPrintData(wxObject), typeof(PrintData)); }
        }

        //-----------------------------------------------------------------------------

        public PrintDialogData PrintDialogData
        {
            get { return (PrintDialogData)FindObject(wxPrintDialog_GetPrintDialogData(wxObject), typeof(PrintDialogData)); }
        }

        //-----------------------------------------------------------------------------

        public DC PrintDC
        {
            get { return (DC)FindObject(wxPrintDialog_GetPrintDC(wxObject), typeof(DC)); }
        }

        //-----------------------------------------------------------------------------
        /** Shows the dialog, returning wx.Window.wxID_OK if the user pressed OK, and wx.Window.wxID_CANCEL otherwise.
         * Please note, that this is not a wx.Dialog.
        */
        public int ShowModal()
        {
            return wxPrintDialog_ShowModal(wxObject);
        }
    }

#if __WXGTK__
    
    public class PrintSetupDialog : Dialog
    {
        [DllImport("wx-c")] static extern IntPtr wxPrintSetupDialog_ctor(IntPtr parent, IntPtr data);
        [DllImport("wx-c")] static extern IntPtr wxPrintSetupDialog_ctorPrintData(IntPtr parent, IntPtr data);
        [DllImport("wx-c")] static extern void wxPrintSetupDialog_Init(IntPtr self, IntPtr data);
        [DllImport("wx-c")] static extern IntPtr wxPrintSetupDialog_GetPrintData(IntPtr self);

        //-----------------------------------------------------------------------------

        internal PrintSetupDialog(IntPtr wxObject)
            : base(wxObject) { }

        public PrintSetupDialog(Window parent) 
            : this(parent, (PrintDialogData)null) { }
        public PrintSetupDialog(Window parent, PrintDialogData data)
            : this(wxPrintSetupDialog_ctor(Object.SafePtr(parent), Object.SafePtr(data))) { }

        public PrintSetupDialog(Window parent, PrintData data)
            : this(wxPrintSetupDialog_ctorPrintData(Object.SafePtr(parent), Object.SafePtr(data))) { }

        //-----------------------------------------------------------------------------

        public void Init(PrintData data)
        {
            wxPrintSetupDialog_Init(wxObject, Object.SafePtr(data));
        }

        //-----------------------------------------------------------------------------

        public PrintData PrintData
        {
            get { return (PrintData)FindObject(wxPrintSetupDialog_GetPrintData(wxObject), typeof(PrintData)); }
        }
    }
    
#endif
}
www.java2v.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.