SplashScreen.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 » SplashScreen.cs
//-----------------------------------------------------------------------------
// wx.NET - SplashScreen.cs
//
// The wxSplashScreen wrapper class.
//
// Written by Bryan Bulten (bryan@bulten.ca)
// (C) 2003 Bryan Bulten 
// Licensed under the wxWidgets license, see LICENSE.txt for details.
//
// $Id: SplashScreen.cs,v 1.9 2007/07/02 20:53:03 harald_meyer Exp $
//-----------------------------------------------------------------------------

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

namespace wx{
    public class SplashScreen : Frame
    {
        public const int wxSPLASH_CENTRE_ON_PARENT   = 0x01;
        public const int wxSPLASH_CENTRE_ON_SCREEN   = 0x02;
        public const int wxSPLASH_NO_CENTRE          = 0x00;
        public const int wxSPLASH_TIMEOUT            = 0x04;
        public const int wxSPLASH_NO_TIMEOUT         = 0x00;

        public const int wxSPLASH_DEFAULT = /*Border.*/wxSIMPLE_BORDER |
                                             wxFRAME_NO_TASKBAR | 
                                             wxSTAY_ON_TOP;

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

        [DllImport("wx-c")] static extern IntPtr wxSplashScreen_ctor(IntPtr bitmap, int splashStyle, int milliseconds, IntPtr parent, int id, ref Point pos, ref Size size, uint style);
        [DllImport("wx-c")] static extern int    wxSplashScreen_GetSplashStyle(IntPtr self);
        [DllImport("wx-c")] static extern IntPtr wxSplashScreen_GetSplashWindow(IntPtr self);
        [DllImport("wx-c")] static extern int    wxSplashScreen_GetTimeout(IntPtr self);

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

        public SplashScreen(IntPtr wxObject) 
            : base(wxObject) { }

        public SplashScreen(Bitmap bitmap, int splashStyle, int milliseconds, Window parent, int id)
            : this(bitmap, splashStyle, milliseconds, parent, id, wxDefaultPosition, wxDefaultSize, wxSPLASH_DEFAULT) { }
        public SplashScreen(Bitmap bitmap, int splashStyle, int milliseconds, Window parent, int id, Point pos)
            : this(bitmap, splashStyle, milliseconds, parent, id, pos, wxDefaultSize, wxSPLASH_DEFAULT) { }
        public SplashScreen(Bitmap bitmap, int splashStyle, int milliseconds, Window parent, int id, Point pos, Size size)
            : this(bitmap, splashStyle, milliseconds, parent, id, pos, size, wxSPLASH_DEFAULT) { }

        public SplashScreen(Bitmap bitmap, int splashStyle, int milliseconds, Window parent, int id, Point pos, Size size, uint style)
            : base(wxSplashScreen_ctor(Object.SafePtr(bitmap), splashStyle, milliseconds, Object.SafePtr(parent), id, ref pos, ref size, style)) { }

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

        public int SplashStyle
        {
            get { return wxSplashScreen_GetSplashStyle(this.wxObject); }
        }

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

        public SplashScreenWindow SplashWindow
        {
            get { return (SplashScreenWindow)FindObject(wxSplashScreen_GetSplashWindow(wxObject), typeof(SplashScreenWindow)); }
        }

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

        public int Timeout
        {
            get { return wxSplashScreen_GetTimeout(wxObject); }
        }
    }
    
    //-----------------------------------------------------------------------------

    public class SplashScreenWindow : Window
    {
        [DllImport("wx-c")] static extern IntPtr wxSplashScreenWindow_ctor(IntPtr bitmap, IntPtr parent, int id, ref Point pos, ref Size size, uint style);
        [DllImport("wx-c")] static extern void   wxSplashScreenWindow_SetBitmap(IntPtr self, IntPtr bitmap);
        [DllImport("wx-c")] static extern IntPtr wxSplashScreenWindow_GetBitmap(IntPtr self);

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

        public SplashScreenWindow(IntPtr wxObject) 
            : base(wxObject) { }

        public SplashScreenWindow(Bitmap bitmap, Window parent, int id, Point pos, Size size, uint style)
            : base(wxSplashScreenWindow_ctor(Object.SafePtr(bitmap), Object.SafePtr(parent), id, ref pos, ref size, style)) { }

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

        public Bitmap Bitmap
        {
            set { wxSplashScreenWindow_SetBitmap(wxObject, Object.SafePtr(value)); }
            get { return (Bitmap)FindObject(wxSplashScreenWindow_GetBitmap(wxObject)); }
        }
    }
}

www.java2v.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.