1. wxEuphoria -- splash screen?

How do you make a splash screen with wxEuphoria?

There is something called "wxSplashScreen" in wxWidgets.
http://www.wxwidgets.org/
[quote]
wxSplashScreen

wxSplashScreen shows a window with a thin border, displaying a bitmap describing
your application. Show it in application initialisation, and then either
explicitly destroy it or let it time-out.
[/quote]

The version under construction of "Diet Monger Ass Kicker" loads USDA data for
7146 foods and 136 nutrients. It takes the data directly from the USDA (United
States Department of Agriculture) files, the way it should have been done in the
first place. From now on updating it for each new SR (Standard Reference) put out
by USDA will be possible simply by downloading the data, and the users can do
that themselves. BTW, the parsing this time is done by Kat's strtok library.

Loading the data takes a wee bit of time, even with my 2.6 GHz Pentium 4.
Acceptable to me, but maybe for some people it will take too long, especially if
they think the computer has hung up.  Solution: splash screen. The splash screen
can have a nice picture, and it can say "stand by for data".  My problem is I
don't know how to make a splash screen with wxEuphoria.

It is not enough to make a message box or somesuch thing that stops all action
and has to be clicked on to make it go away so that data can begin to load. That
would be no good. What I want is a picture showing while the data is loading, and
then the picture goes away by itself when the data is finished loading.

How do you do it?

new topic     » topic index » view message » categorize

2. Re: wxEuphoria -- splash screen?

Jerry Story wrote:
> 
> How do you make a splash screen with wxEuphoria?
> 
> There is something called "wxSplashScreen" in wxWidgets.
> 
> How do you do it?

Wow, somehow I never really noticed that class.  Here are wrappers and a 
small demo (replace the graphic with something you have):

Win32:
--/////////////////////////////////////////////////////////////////////////////
--// Name:        wxSplashScreen.e
--// Purpose:     Class include for wxEuphoria
--// Author:      Matt Lewis
--// Modified by:
--// Created:     2005-11-03
--// Copyright:   (c) Matt Lewis
--// Licence:     wxWindows license
--/////////////////////////////////////////////////////////////////////////////

include dll.e
include cplusplus.e as cpp
include wxEuphoria.e as wxeu

-- begin autogenerated
------------------------------
include wxClassInfo.e as CI

-- begin class wxSplashScreen (10 members)
------------------------------

global constant 

-- wxSplashScreen::GetClassInfo() const
wxSplashScreen_GetClassInfo = define_c_var( wxWin,
"@wxSplashScreen@GetClassInfo$xqv" ),

-- wxSplashScreen::GetEventTable() const
wxSplashScreen_GetEventTable = define_c_var( wxWin,
"@wxSplashScreen@GetEventTable$xqv" ),

-- wxSplashScreen::OnCloseWindow(wxCloseEvent&)
wxSplashScreen_OnCloseWindow = define_c_var( wxWin,
"@wxSplashScreen@OnCloseWindow$qr12wxCloseEvent" ),

-- wxSplashScreen::OnNotify(wxTimerEvent&)
wxSplashScreen_OnNotify = define_c_var( wxWin,
"@wxSplashScreen@OnNotify$qr12wxTimerEvent" ),

-- wxSplashScreen::wxSplashScreen(const wxBitmap&, long, int, wxWindow *, int,
const wxPoint&, const wxSize&, long)
wxSplashScreen_op_ctr = define_c_var( wxWin,
"@wxSplashScreen@$bctr$qrx8wxBitmaplip8wxWindowirx7wxPointrx6wxSizel" ),

-- wxSplashScreen::wxSplashScreen()
wxSplashScreen_op_ctr_1 = define_c_var( wxWin, "@wxSplashScreen@$bctr$qv" ),

-- wxSplashScreen::~wxSplashScreen()
wxSplashScreen_op_dtr = define_c_var( wxWin, "@wxSplashScreen@$bdtr$qv" ),

-- wxSplashScreen::sm_classwxSplashScreen
wxSplashScreen_sm_classwxSplashScreen = define_c_var( wxWin,
"@wxSplashScreen@sm_classwxSplashScreen" ),

-- wxSplashScreen::sm_eventTable
wxSplashScreen_sm_eventTable = define_c_var( wxWin,
"@wxSplashScreen@sm_eventTable" ),

-- wxSplashScreen::sm_eventTableEntries
wxSplashScreen_sm_eventTableEntries = define_c_var( wxWin,
"@wxSplashScreen@sm_eventTableEntries" ),

sizeof_wxSplashScreen = CI:sizeof_class( wxSplashScreen_sm_classwxSplashScreen
),
wxSplashScreen = define_class( "wxSplashScreen", wxWin, wxSplashScreen_op_ctr,
sizeof_wxSplashScreen, 0 )

-- end class wxSplashScreen
------------------------------


-- begin class wxSplashScreenWindow (8 members)
------------------------------

global constant 

-- wxSplashScreenWindow::GetEventTable() const
wxSplashScreenWindow_GetEventTable = define_c_var( wxWin,
"@wxSplashScreenWindow@GetEventTable$xqv" ),

-- wxSplashScreenWindow::OnChar(wxKeyEvent&)
wxSplashScreenWindow_OnChar = define_c_var( wxWin,
"@wxSplashScreenWindow@OnChar$qr10wxKeyEvent" ),

-- wxSplashScreenWindow::OnEraseBackground(wxEraseEvent&)
wxSplashScreenWindow_OnEraseBackground = define_c_var( wxWin,
"@wxSplashScreenWindow@OnEraseBackground$qr12wxEraseEvent" ),

-- wxSplashScreenWindow::OnMouseEvent(wxMouseEvent&)
wxSplashScreenWindow_OnMouseEvent = define_c_var( wxWin,
"@wxSplashScreenWindow@OnMouseEvent$qr12wxMouseEvent" ),

-- wxSplashScreenWindow::OnPaint(wxPaintEvent&)
wxSplashScreenWindow_OnPaint = define_c_var( wxWin,
"@wxSplashScreenWindow@OnPaint$qr12wxPaintEvent" ),

-- wxSplashScreenWindow::wxSplashScreenWindow(const wxBitmap&, wxWindow *, int,
const wxPoint&, const wxSize&, long)
wxSplashScreenWindow_op_ctr = define_c_var( wxWin,
"@wxSplashScreenWindow@$bctr$qrx8wxBitmapp8wxWindowirx7wxPointrx6wxSizel" ),

-- wxSplashScreenWindow::sm_eventTable
wxSplashScreenWindow_sm_eventTable = define_c_var( wxWin,
"@wxSplashScreenWindow@sm_eventTable" ),

-- wxSplashScreenWindow::sm_eventTableEntries
wxSplashScreenWindow_sm_eventTableEntries = define_c_var( wxWin,
"@wxSplashScreenWindow@sm_eventTableEntries" ),

sizeof_wxSplashScreenWindow = 1,
wxSplashScreenWindow = define_class( "wxSplashScreenWindow", wxWin,
wxSplashScreenWindow_op_ctr, sizeof_wxSplashScreenWindow, 0 )

-- end class wxSplashScreenWindow
------------------------------

-- end autogenerated
------------------------------

global constant
wxSPLASH_CENTRE_ON_PARENT   = #01,
wxSPLASH_CENTRE_ON_SCREEN   = #02,
wxSPLASH_NO_CENTRE          = #00,
wxSPLASH_TIMEOUT            = #04,
wxSPLASH_NO_TIMEOUT         = #00

--wxSplashScreen(
--	const wxBitmap& bitmap, 
--	long splashStyle, 
--	int milliseconds, 
--	wxWindow* parent, 
--	wxWindowID id, 
--	const wxPoint& pos = wxDefaultPosition, 
--	const wxSize& size = wxDefaultSize, 
--	long style = wxSIMPLE_BORDER|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP)

--/topic wxSplashScreen
--/parent Classes
--/parent Controls
--/info
--include file: wxSplashScreen.e
--Creation parameters:
--<ul>
--/li bitmap
--/li splashStyle
--/li milliseconds
--/li parent
--/li id [= -1]
--/li x [= -1]
--/li y [= -1]
--/li cx [= -1]
--/li cy [= -1]
--/li style [= wxSIMPLE_BORDER|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP]'
--</ul>
constant default_splash = { 0, 0, 0, 0, -1, wxDefaultPosition, wxDefaultSize, 
	wx_or_all( wxSIMPLE_BORDER & wxFRAME_NO_TASKBAR & wxSTAY_ON_TOP ) }
function new_wxSplashWindow( sequence params )
	sequence splash
	integer len
	splash = default_splash
	splash[1..4] = params[1..4]
	len = length(params)
	if len > 4 then
		splash[5] = params[5]
		if len > 6 then
			splash[6] = create( wxPoint, params[6..7] )
			if len > 8 then
				splash[7] = create( wxSize, params[8..9] )
				if len > 9 then
					splash[8] = params[10]
				end if
			end if
		end if
	end if
	return new_instance( wxSplashScreen, 0, splash )
end function


Linux (only the imports):
-- begin class wxSplashScreen (17 members)
------------------------------

global constant 

-- wxSplashScreen::GetClassInfo() const
wxSplashScreen_GetClassInfo = define_c_var( wxWin,
"_ZNK14wxSplashScreen12GetClassInfoEv" ),

-- wxSplashScreen::GetEventTable() const
wxSplashScreen_GetEventTable = define_c_var( wxWin,
"_ZNK14wxSplashScreen13GetEventTableEv" ),

-- wxSplashScreen::GetSplashStyle() const
wxSplashScreen_GetSplashStyle = define_c_var( wxWin,
"_ZNK14wxSplashScreen14GetSplashStyleEv" ),

-- wxSplashScreen::GetSplashWindow() const
wxSplashScreen_GetSplashWindow = define_c_var( wxWin,
"_ZNK14wxSplashScreen15GetSplashWindowEv" ),

-- wxSplashScreen::GetTimeout() const
wxSplashScreen_GetTimeout = define_c_var( wxWin,
"_ZNK14wxSplashScreen10GetTimeoutEv" ),

-- wxSplashScreen::OnCloseWindow(wxCloseEvent&)
wxSplashScreen_OnCloseWindow = define_c_var( wxWin,
"_ZN14wxSplashScreen13OnCloseWindowER12wxCloseEvent" ),

-- wxSplashScreen::OnNotify(wxTimerEvent&)
wxSplashScreen_OnNotify = define_c_var( wxWin,
"_ZN14wxSplashScreen8OnNotifyER12wxTimerEvent" ),

-- wxSplashScreen::sm_classwxSplashScreen
wxSplashScreen_sm_classwxSplashScreen = define_c_var( wxWin,
"_ZN14wxSplashScreen22sm_classwxSplashScreenE" ),

-- wxSplashScreen::sm_eventTable
wxSplashScreen_sm_eventTable = define_c_var( wxWin,
"_ZN14wxSplashScreen13sm_eventTableE" ),

-- wxSplashScreen::sm_eventTableEntries
wxSplashScreen_sm_eventTableEntries = define_c_var( wxWin,
"_ZN14wxSplashScreen20sm_eventTableEntriesE" ),

-- wxSplashScreen::wxSplashScreen[in-charge](wxBitmap const&, long, int,
wxWindow*, int, wxPoint const&, wxSize const&, long)
wxSplashScreen_ctor = define_c_var( wxWin,
"_ZN14wxSplashScreenC1ERK8wxBitmapliP8wxWindowiRK7wxPointRK6wxSizel" ),

-- wxSplashScreen::wxSplashScreen[in-charge]()
wxSplashScreen_wxSplashScreen_1 = define_c_var( wxWin, "_ZN14wxSplashScreenC1Ev"
),

-- wxSplashScreen::wxSplashScreen[not-in-charge](wxBitmap const&, long, int,
wxWindow*, int, wxPoint const&, wxSize const&, long)
wxSplashScreen_wxSplashScreen_2 = define_c_var( wxWin,
"_ZN14wxSplashScreenC2ERK8wxBitmapliP8wxWindowiRK7wxPointRK6wxSizel" ),

-- wxSplashScreen::wxSplashScreen[not-in-charge]()
wxSplashScreen_wxSplashScreen_3 = define_c_var( wxWin, "_ZN14wxSplashScreenC2Ev"
),

-- wxSplashScreen::~wxSplashScreen [in-charge deleting]()
wxSplashScreen_dtor = define_c_var( wxWin, "_ZN14wxSplashScreenD0Ev" ),

-- wxSplashScreen::~wxSplashScreen [in-charge]()
wxSplashScreen_dtor2 = define_c_var( wxWin, "_ZN14wxSplashScreenD1Ev" ),

-- wxSplashScreen::~wxSplashScreen [not-in-charge]()
wxSplashScreen_dtor3 = define_c_var( wxWin, "_ZN14wxSplashScreenD2Ev" ),

sizeof_wxSplashScreen = CI:sizeof_class( wxSplashScreen_sm_classwxSplashScreen
),
wxSplashScreen = define_class( "wxSplashScreen", wxWin, wxSplashScreen_ctor,
sizeof_wxSplashScreen, wxSplashScreen_dtor )

-- end class wxSplashScreen
------------------------------


-- begin class wxSplashScreenWindow (13 members)
------------------------------

global constant 

-- wxSplashScreenWindow::GetBitmap()
wxSplashScreenWindow_GetBitmap = define_c_var( wxWin,
"_ZN20wxSplashScreenWindow9GetBitmapEv" ),

-- wxSplashScreenWindow::GetEventTable() const
wxSplashScreenWindow_GetEventTable = define_c_var( wxWin,
"_ZNK20wxSplashScreenWindow13GetEventTableEv" ),

-- wxSplashScreenWindow::OnChar(wxKeyEvent&)
wxSplashScreenWindow_OnChar = define_c_var( wxWin,
"_ZN20wxSplashScreenWindow6OnCharER10wxKeyEvent" ),

-- wxSplashScreenWindow::OnEraseBackground(wxEraseEvent&)
wxSplashScreenWindow_OnEraseBackground = define_c_var( wxWin,
"_ZN20wxSplashScreenWindow17OnEraseBackgroundER12wxEraseEvent" ),

-- wxSplashScreenWindow::OnMouseEvent(wxMouseEvent&)
wxSplashScreenWindow_OnMouseEvent = define_c_var( wxWin,
"_ZN20wxSplashScreenWindow12OnMouseEventER12wxMouseEvent" ),

-- wxSplashScreenWindow::OnPaint(wxPaintEvent&)
wxSplashScreenWindow_OnPaint = define_c_var( wxWin,
"_ZN20wxSplashScreenWindow7OnPaintER12wxPaintEvent" ),

-- wxSplashScreenWindow::SetBitmap(wxBitmap const&)
wxSplashScreenWindow_SetBitmap = define_c_var( wxWin,
"_ZN20wxSplashScreenWindow9SetBitmapERK8wxBitmap" ),

-- wxSplashScreenWindow::sm_eventTable
wxSplashScreenWindow_sm_eventTable = define_c_var( wxWin,
"_ZN20wxSplashScreenWindow13sm_eventTableE" ),

-- wxSplashScreenWindow::sm_eventTableEntries
wxSplashScreenWindow_sm_eventTableEntries = define_c_var( wxWin,
"_ZN20wxSplashScreenWindow20sm_eventTableEntriesE" ),

-- wxSplashScreenWindow::wxSplashScreenWindow[in-charge](wxBitmap const&,
wxWindow*, int, wxPoint const&, wxSize const&, long)
wxSplashScreenWindow_ctor = define_c_var( wxWin,
"_ZN20wxSplashScreenWindowC1ERK8wxBitmapP8wxWindowiRK7wxPointRK6wxSizel" ),

-- wxSplashScreenWindow::wxSplashScreenWindow[not-in-charge](wxBitmap const&,
wxWindow*, int, wxPoint const&, wxSize const&, long)
wxSplashScreenWindow_wxSplashScreenWindow_1 = define_c_var( wxWin,
"_ZN20wxSplashScreenWindowC2ERK8wxBitmapP8wxWindowiRK7wxPointRK6wxSizel" ),

-- wxSplashScreenWindow::~wxSplashScreenWindow [in-charge deleting]()
wxSplashScreenWindow_dtor = define_c_var( wxWin, "_ZN20wxSplashScreenWindowD0Ev"
),

-- wxSplashScreenWindow::~wxSplashScreenWindow [in-charge]()
wxSplashScreenWindow_dtor2 = define_c_var( wxWin,
"_ZN20wxSplashScreenWindowD1Ev" ),

sizeof_wxSplashScreenWindow = 1,
wxSplashScreenWindow = define_class( "wxSplashScreenWindow", wxWin, 0,
sizeof_wxSplashScreenWindow, 0 )

-- end class wxSplashScreenWindow
------------------------------

-- end autogenerated
------------------------------


And a small demo:
include wxEuphoria.e
include wxGraphics.e
include wxSplashScreen.e

constant
main = create( wxFrame, {0, -1, "Splash Demo"}),
bmp = create( wxBitmap, {BM_FROM_FILE, "space.bmp", wxBITMAP_TYPE_BMP}),
splash = create( wxSplashScreen, { bmp, wxSPLASH_CENTRE_ON_SCREEN +
wxSPLASH_TIMEOUT, 2000, main })

object void
void = call_member( wxApp_Yield, myApp_this, {1})

wxMain( main )


Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

3. Re: wxEuphoria -- splash screen?

I'm having a hard time getting the splash screen demo to work for Linux.

Matt Lewis wrote:

> Win32:
> }}}
<eucode>
>
> --/////////////////////////////////////////////////////////////////////////////
> --// Name:        wxSplashScreen.e
> --// Purpose:     Class include for wxEuphoria
> --// Author:      Matt Lewis
> --// Modified by:
> --// Created:     2005-11-03
> --// Copyright:   (c) Matt Lewis
> --// Licence:     wxWindows license
>
> --/////////////////////////////////////////////////////////////////////////////
> 
> include dll.e
> include cplusplus.e as cpp
> include wxEuphoria.e as wxeu
> 
> -- begin autogenerated
> ------------------------------
> include wxClassInfo.e as CI
> 
> -- begin class wxSplashScreen (10 members)
> ------------------------------
> 
> global constant 
> 
> -- wxSplashScreen::GetClassInfo() const
> wxSplashScreen_GetClassInfo = define_c_var( wxWin,
> "@wxSplashScreen@GetClassInfo$xqv" ),
> 
> -- wxSplashScreen::GetEventTable() const
> wxSplashScreen_GetEventTable = define_c_var( wxWin,
> "@wxSplashScreen@GetEventTable$xqv" ),
> 
> -- wxSplashScreen::OnCloseWindow(wxCloseEvent&)
> wxSplashScreen_OnCloseWindow = define_c_var( wxWin,
> "@wxSplashScreen@OnCloseWindow$qr12wxCloseEvent" ),
> 
> -- wxSplashScreen::OnNotify(wxTimerEvent&)
> wxSplashScreen_OnNotify = define_c_var( wxWin,
> "@wxSplashScreen@OnNotify$qr12wxTimerEvent" ),
> 
> -- wxSplashScreen::wxSplashScreen(const wxBitmap&, long, int, wxWindow *, int,
> const wxPoint&, const wxSize&, long)
> wxSplashScreen_op_ctr = define_c_var( wxWin,
> "@wxSplashScreen@$bctr$qrx8wxBitmaplip8wxWindowirx7wxPointrx6wxSizel" ),
> 
> -- wxSplashScreen::wxSplashScreen()
> wxSplashScreen_op_ctr_1 = define_c_var( wxWin, "@wxSplashScreen@$bctr$qv" ),
> 
> -- wxSplashScreen::~wxSplashScreen()
> wxSplashScreen_op_dtr = define_c_var( wxWin, "@wxSplashScreen@$bdtr$qv" ),
> 
> -- wxSplashScreen::sm_classwxSplashScreen
> wxSplashScreen_sm_classwxSplashScreen = define_c_var( wxWin,
> "@wxSplashScreen@sm_classwxSplashScreen" ),
> 
> -- wxSplashScreen::sm_eventTable
> wxSplashScreen_sm_eventTable = define_c_var( wxWin,
> "@wxSplashScreen@sm_eventTable" ),
> 
> -- wxSplashScreen::sm_eventTableEntries
> wxSplashScreen_sm_eventTableEntries = define_c_var( wxWin,
> "@wxSplashScreen@sm_eventTableEntries" ),
> 
> sizeof_wxSplashScreen = CI:sizeof_class( wxSplashScreen_sm_classwxSplashScreen
> ),
> wxSplashScreen = define_class( "wxSplashScreen", wxWin, wxSplashScreen_op_ctr,
> sizeof_wxSplashScreen, 0 )
> 
> -- end class wxSplashScreen
> ------------------------------
> 
> 
> -- begin class wxSplashScreenWindow (8 members)
> ------------------------------
> 
> global constant 
> 
> -- wxSplashScreenWindow::GetEventTable() const
> wxSplashScreenWindow_GetEventTable = define_c_var( wxWin,
> "@wxSplashScreenWindow@GetEventTable$xqv" ),
> 
> -- wxSplashScreenWindow::OnChar(wxKeyEvent&)
> wxSplashScreenWindow_OnChar = define_c_var( wxWin,
> "@wxSplashScreenWindow@OnChar$qr10wxKeyEvent" ),
> 
> -- wxSplashScreenWindow::OnEraseBackground(wxEraseEvent&)
> wxSplashScreenWindow_OnEraseBackground = define_c_var( wxWin,
> "@wxSplashScreenWindow@OnEraseBackground$qr12wxEraseEvent" ),
> 
> -- wxSplashScreenWindow::OnMouseEvent(wxMouseEvent&)
> wxSplashScreenWindow_OnMouseEvent = define_c_var( wxWin,
> "@wxSplashScreenWindow@OnMouseEvent$qr12wxMouseEvent" ),
> 
> -- wxSplashScreenWindow::OnPaint(wxPaintEvent&)
> wxSplashScreenWindow_OnPaint = define_c_var( wxWin,
> "@wxSplashScreenWindow@OnPaint$qr12wxPaintEvent" ),
> 
> -- wxSplashScreenWindow::wxSplashScreenWindow(const wxBitmap&, wxWindow *,
> int, const wxPoint&, const wxSize&, long)
> wxSplashScreenWindow_op_ctr = define_c_var( wxWin,
> "@wxSplashScreenWindow@$bctr$qrx8wxBitmapp8wxWindowirx7wxPointrx6wxSizel" ),
> 
> -- wxSplashScreenWindow::sm_eventTable
> wxSplashScreenWindow_sm_eventTable = define_c_var( wxWin,
> "@wxSplashScreenWindow@sm_eventTable" ),
> 
> -- wxSplashScreenWindow::sm_eventTableEntries
> wxSplashScreenWindow_sm_eventTableEntries = define_c_var( wxWin,
> "@wxSplashScreenWindow@sm_eventTableEntries" ),
> 
> sizeof_wxSplashScreenWindow = 1,
> wxSplashScreenWindow = define_class( "wxSplashScreenWindow", wxWin,
> wxSplashScreenWindow_op_ctr, sizeof_wxSplashScreenWindow, 0 )
> 
> -- end class wxSplashScreenWindow
> ------------------------------
> 
> -- end autogenerated
> ------------------------------
> 
> global constant
> wxSPLASH_CENTRE_ON_PARENT   = #01,
> wxSPLASH_CENTRE_ON_SCREEN   = #02,
> wxSPLASH_NO_CENTRE          = #00,
> wxSPLASH_TIMEOUT            = #04,
> wxSPLASH_NO_TIMEOUT         = #00
> 
> --wxSplashScreen(
> --	const wxBitmap& bitmap, 
> --	long splashStyle, 
> --	int milliseconds, 
> --	wxWindow* parent, 
> --	wxWindowID id, 
> --	const wxPoint& pos = wxDefaultPosition, 
> --	const wxSize& size = wxDefaultSize, 
> --	long style = wxSIMPLE_BORDER|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP)
> 
> --/topic wxSplashScreen
> --/parent Classes
> --/parent Controls
<snip>

new topic     » goto parent     » topic index » view message » categorize

4. Re: wxEuphoria -- splash screen?

Jerry Story wrote:
> 
> I'm having a hard time getting the splash screen demo to work for Linux.
> 

Oops, sorry 'bout that, I managed to screw up the wrapper.  I named the 
function incorrectly, and didn't register it with create_func().  Here's 
how it should look (actually tested it on Linux this time...):

function new_wxSplashScreen( sequence params )
	sequence splash
	integer len
	splash = default_splash
	splash[1..4] = params[1..4]
	len = length(params)
	if len > 4 then
		splash[5] = params[5]
		if len > 6 then
			splash[6] = create( wxPoint, params[6..7] )
			if len > 8 then
				splash[7] = create( wxSize, params[8..9] )
				if len > 9 then
					splash[8] = params[10]
				end if
			end if
		end if
	end if
	return new_instance( wxSplashScreen, 0, splash )
end function
create_func( wxSplashScreen, routine_id("new_wxSplashScreen") )


Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

5. Re: wxEuphoria -- splash screen?

Matt Lewis wrote:
> 
> Jerry Story wrote:
> > 
> > I'm having a hard time getting the splash screen demo to work for Linux.
> > 
> 
> Oops, sorry 'bout that, I managed to screw up the wrapper.  I named the 
> function incorrectly, and didn't register it with create_func().  Here's 
> how it should look (actually tested it on Linux this time...):

[...]

That's an improvement. Now it makes a window; previously it didn't.  But no
picture and these error messages:

[quote]
Gdk-CRITICAL **: file gdkgc.c: line 689 (gdk_gc_set_clip_rectangle): assertion
'gc != NULL' failed.

Gdk-CRITICAL **: file gdkdraw.c: line 90 (gdk_draw_rectangle): assertion 'gc !=
NULL' failed.

Gdk-CRITICAL **: file gdkgc.c: line 689 (gdk_gc_set_clip_rectangle): assertion
'gc != NULL' failed.
[/quote]

It is possible and perhaps probable that I didn't install wxSplashScreen.e
correctly from the message, because I find that a bit confusing.

Commenting out this line in the demo:

splash = create( wxSplashScreen, { bmp,
 wxSPLASH_CENTRE_ON_SCREEN + wxSPLASH_TIMEOUT, 2000, main })

stops the error messages.

There is a bmp file in the directory that the demo is in, and the bmp is named
correctly in the demo.

new topic     » goto parent     » topic index » view message » categorize

6. Re: wxEuphoria -- splash screen?

Jerry Story wrote:
> 
> Matt Lewis wrote:
> > 
> > Jerry Story wrote:
> > > 
> > > I'm having a hard time getting the splash screen demo to work for Linux.
> > > 
> > 
> > Oops, sorry 'bout that, I managed to screw up the wrapper.  I named the 
> > function incorrectly, and didn't register it with create_func().  Here's 
> > how it should look (actually tested it on Linux this time...):
> 
> [...]
> 
> That's an improvement. Now it makes a window; previously it didn't.  But no
> picture and these error messages:
> 
> [quote]
> Gdk-CRITICAL **: file gdkgc.c: line 689 (gdk_gc_set_clip_rectangle): assertion
> 'gc != NULL' failed.
> 
> Gdk-CRITICAL **: file gdkdraw.c: line 90 (gdk_draw_rectangle): assertion 'gc
> != NULL' failed.
> 
> Gdk-CRITICAL **: file gdkgc.c: line 689 (gdk_gc_set_clip_rectangle): assertion
> 'gc != NULL' failed.
> [/quote]
> 
> It is possible and perhaps probable that I didn't install wxSplashScreen.e
> correctly
> from the message, because I find that a bit confusing.
> 

Here is the full Linux version of the file:

--/////////////////////////////////////////////////////////////////////////////
--// Name:        wxSplashScreen.e
--// Purpose:     Class include for wxEuphoria
--// Author:      Matt Lewis
--// Modified by:
--// Created:     2005-11-03
--// Copyright:   (c) Matt Lewis
--// Licence:     wxWindows license
--/////////////////////////////////////////////////////////////////////////////

include dll.e
include cplusplus.e as cpp
include wxEuphoria.e as wxeu

-- begin autogenerated
------------------------------
include wxClassInfo.e as CI

-- begin class wxSplashScreen (17 members)
------------------------------

global constant 

-- wxSplashScreen::GetClassInfo() const
wxSplashScreen_GetClassInfo = define_c_var( wxWin,
"_ZNK14wxSplashScreen12GetClassInfoEv" ),

-- wxSplashScreen::GetEventTable() const
wxSplashScreen_GetEventTable = define_c_var( wxWin,
"_ZNK14wxSplashScreen13GetEventTableEv" ),

-- wxSplashScreen::GetSplashStyle() const
wxSplashScreen_GetSplashStyle = define_c_var( wxWin,
"_ZNK14wxSplashScreen14GetSplashStyleEv" ),

-- wxSplashScreen::GetSplashWindow() const
wxSplashScreen_GetSplashWindow = define_c_var( wxWin,
"_ZNK14wxSplashScreen15GetSplashWindowEv" ),

-- wxSplashScreen::GetTimeout() const
wxSplashScreen_GetTimeout = define_c_var( wxWin,
"_ZNK14wxSplashScreen10GetTimeoutEv" ),

-- wxSplashScreen::OnCloseWindow(wxCloseEvent&)
wxSplashScreen_OnCloseWindow = define_c_var( wxWin,
"_ZN14wxSplashScreen13OnCloseWindowER12wxCloseEvent" ),

-- wxSplashScreen::OnNotify(wxTimerEvent&)
wxSplashScreen_OnNotify = define_c_var( wxWin,
"_ZN14wxSplashScreen8OnNotifyER12wxTimerEvent" ),

-- wxSplashScreen::sm_classwxSplashScreen
wxSplashScreen_sm_classwxSplashScreen = define_c_var( wxWin,
"_ZN14wxSplashScreen22sm_classwxSplashScreenE" ),

-- wxSplashScreen::sm_eventTable
wxSplashScreen_sm_eventTable = define_c_var( wxWin,
"_ZN14wxSplashScreen13sm_eventTableE" ),

-- wxSplashScreen::sm_eventTableEntries
wxSplashScreen_sm_eventTableEntries = define_c_var( wxWin,
"_ZN14wxSplashScreen20sm_eventTableEntriesE" ),

-- wxSplashScreen::wxSplashScreen[in-charge](wxBitmap const&, long, int,
wxWindow*, int, wxPoint const&, wxSize const&, long)
wxSplashScreen_ctor = define_c_var( wxWin,
"_ZN14wxSplashScreenC1ERK8wxBitmapliP8wxWindowiRK7wxPointRK6wxSizel" ),

-- wxSplashScreen::wxSplashScreen[in-charge]()
wxSplashScreen_wxSplashScreen_1 = define_c_var( wxWin, "_ZN14wxSplashScreenC1Ev"
),

-- wxSplashScreen::wxSplashScreen[not-in-charge](wxBitmap const&, long, int,
wxWindow*, int, wxPoint const&, wxSize const&, long)
wxSplashScreen_wxSplashScreen_2 = define_c_var( wxWin,
"_ZN14wxSplashScreenC2ERK8wxBitmapliP8wxWindowiRK7wxPointRK6wxSizel" ),

-- wxSplashScreen::wxSplashScreen[not-in-charge]()
wxSplashScreen_wxSplashScreen_3 = define_c_var( wxWin, "_ZN14wxSplashScreenC2Ev"
),

-- wxSplashScreen::~wxSplashScreen [in-charge deleting]()
wxSplashScreen_dtor = define_c_var( wxWin, "_ZN14wxSplashScreenD0Ev" ),

-- wxSplashScreen::~wxSplashScreen [in-charge]()
wxSplashScreen_dtor2 = define_c_var( wxWin, "_ZN14wxSplashScreenD1Ev" ),

-- wxSplashScreen::~wxSplashScreen [not-in-charge]()
wxSplashScreen_dtor3 = define_c_var( wxWin, "_ZN14wxSplashScreenD2Ev" ),

sizeof_wxSplashScreen = CI:sizeof_class( wxSplashScreen_sm_classwxSplashScreen
),
wxSplashScreen = define_class( "wxSplashScreen", wxWin, wxSplashScreen_ctor,
sizeof_wxSplashScreen, wxSplashScreen_dtor )

-- end class wxSplashScreen
------------------------------

-- end autogenerated
------------------------------

global constant
wxSPLASH_CENTRE_ON_PARENT   = #01,
wxSPLASH_CENTRE_ON_SCREEN   = #02,
wxSPLASH_NO_CENTRE          = #00,
wxSPLASH_TIMEOUT            = #04,
wxSPLASH_NO_TIMEOUT         = #00

--wxSplashScreen(
--	const wxBitmap& bitmap, 
--	long splashStyle, 
--	int milliseconds, 
--	wxWindow* parent, 
--	wxWindowID id, 
--	const wxPoint& pos = wxDefaultPosition, 
--	const wxSize& size = wxDefaultSize, 
--	long style = wxSIMPLE_BORDER|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP)

--/topic wxSplashScreen
--/parent Classes
--/parent Controls
--/info
--include file: wxSplashScreen.e
--Creation parameters:
--<ul>
--/li bitmap
--/li splashStyle
--/li milliseconds
--/li parent
--/li id [= -1]
--/li x [= -1]
--/li y [= -1]
--/li cx [= -1]
--/li cy [= -1]
--/li style [= wxSIMPLE_BORDER|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP]'
--</ul>

-- wxSplashScreen::wxSplashScreen[in-charge](wxBitmap const&, long, int,
wxWindow*, int, wxPoint const&, wxSize const&, long)
constant default_splash = { 0, 0, 0, 0, -1, wxDefaultPosition, wxDefaultSize, 
	wx_or_all( wxSIMPLE_BORDER & wxFRAME_NO_TASKBAR & wxSTAY_ON_TOP ) }
function new_wxSplashScreen( sequence params )
	sequence splash
	integer len
	splash = default_splash
	splash[1..4] = params[1..4]
	len = length(params)
	if len > 4 then
		splash[5] = params[5]
		if len > 6 then
			splash[6] = create( wxPoint, params[6..7] )
			if len > 8 then
				splash[7] = create( wxSize, params[8..9] )
				if len > 9 then
					splash[8] = params[10]
				end if
			end if
		end if
	end if
	return new_instance( wxSplashScreen, 0, splash )
end function
create_func( wxSplashScreen, routine_id("new_wxSplashScreen"))
-- END wxSplashScreen.e


Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

7. Re: wxEuphoria -- splash screen?

Matt Lewis wrote:
> 
> Jerry Story wrote:
> > 
> > Matt Lewis wrote:
> > > 
> > > Jerry Story wrote:
> > > > 
> > > > I'm having a hard time getting the splash screen demo to work for Linux.
> > > > 
> > > 
> > > Oops, sorry 'bout that, I managed to screw up the wrapper.  I named the 
> > > function incorrectly, and didn't register it with create_func().  Here's 
> > > how it should look (actually tested it on Linux this time...):
> > 
> > [...]
> > 
> > That's an improvement. Now it makes a window; previously it didn't.  But no
> > picture and these error messages:
> > 
> > [quote]
> > Gdk-CRITICAL **: file gdkgc.c: line 689 (gdk_gc_set_clip_rectangle):
> > assertion
> > 'gc != NULL' failed.
> > 
> > Gdk-CRITICAL **: file gdkdraw.c: line 90 (gdk_draw_rectangle): assertion 'gc
> > != NULL' failed.
> > 
> > Gdk-CRITICAL **: file gdkgc.c: line 689 (gdk_gc_set_clip_rectangle):
> > assertion
> > 'gc != NULL' failed.
> > [/quote]
> > 
> > It is possible and perhaps probable that I didn't install wxSplashScreen.e
> > correctly
> > from the message, because I find that a bit confusing.
> > 
> 
> Here is the full Linux version of the file:
> 
> }}}
<eucode>
[..]

I'm still getting the same error message.

new topic     » goto parent     » topic index » view message » categorize

8. Re: wxEuphoria -- splash screen?

Jerry Story wrote:

> I'm still getting the same error message.

Jerry:
    I don't use wxEuphoria but from your errors it looks
like you are either creating your bmp without using the
the correct graphics context or you are drawing the
bmp without the correct graphics context.

Bernie

My files in archive:
w32engin.ew mixedlib.e eu_engin.e win32eru.exw

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

new topic     » goto parent     » topic index » view message » categorize

9. Re: wxEuphoria -- splash screen?

Jerry Story wrote:
> 

> > > 
> > > That's an improvement. Now it makes a window; previously it didn't.  But
> > > no
> > > picture and these error messages:
> > > 
> > > [quote]
> > > Gdk-CRITICAL **: file gdkgc.c: line 689 (gdk_gc_set_clip_rectangle):
> > > assertion
> > > 'gc != NULL' failed.
> > > 
> > > Gdk-CRITICAL **: file gdkdraw.c: line 90 (gdk_draw_rectangle): assertion
> > > 'gc
> > > != NULL' failed.
> > > 
> > > Gdk-CRITICAL **: file gdkgc.c: line 689 (gdk_gc_set_clip_rectangle):
> > > assertion
> > > 'gc != NULL' failed.
> > > [/quote]
> 
> I'm still getting the same error message.

That's really strange.  I have to agree with Bernie that something seems to
be wrong with the graphic itself.  Can you draw the graphic onto another 
window?

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

10. Re: wxEuphoria -- splash screen?

Matt Lewis wrote:
> That's really strange.  I have to agree with Bernie that something seems to
> be wrong with the graphic itself.  Can you draw the graphic onto another 
> window?
> 
> Matt Lewis

Matt:
  In X windows a pixmap is an off-screen drawable with any depth supported by
  the screen. In X windows a bitmap is a pixmap with a depth of exactly one.
  This may be the confusion. You have to use a X pixmap to draw in a X window.
Bernie

My files in archive:
w32engin.ew mixedlib.e eu_engin.e win32eru.exw

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

new topic     » goto parent     » topic index » view message » categorize

11. Re: wxEuphoria -- splash screen?

Bernie Ryan wrote:
> 
> Matt Lewis wrote:
> > That's really strange.  I have to agree with Bernie that something seems to
> > be wrong with the graphic itself.  Can you draw the graphic onto another 
> > window?
> > 
> > Matt Lewis
> 
> Matt:
>   In X windows a pixmap is an off-screen drawable with any depth supported by
>   the screen. In X windows a bitmap is a pixmap with a depth of exactly one.
>   This may be the confusion. You have to use a X pixmap to draw in a X window.

No, I'm just wondering if the wxBitmap is really getting initialized correctly
or not.  wxWidgets handles all the drawing and whatnot, so it's not clear
where the problem is (somewhere between wxWidgets/GTK/X).  If he can draw
the wxBitmap to another window, it will at least tell us where the problem
isn't.

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

12. Re: wxEuphoria -- splash screen?

Matt Lewis wrote:
> 
> Jerry Story wrote:
> > 
> 
> > > > That's an improvement. Now it makes a window; previously it didn't.  But
> > > > no
> > > > picture and these error messages:
> > > > 
> > > > [quote]
> > > > Gdk-CRITICAL **: file gdkgc.c: line 689 (gdk_gc_set_clip_rectangle):
> > > > assertion
> > > > 'gc != NULL' failed.
> > > > 
> > > > Gdk-CRITICAL **: file gdkdraw.c: line 90 (gdk_draw_rectangle): assertion
> > > > 'gc
> > > > != NULL' failed.
> > > > 
> > > > Gdk-CRITICAL **: file gdkgc.c: line 689 (gdk_gc_set_clip_rectangle):
> > > > assertion
> > > > 'gc != NULL' failed.
> > > > [/quote]
> > 
> > I'm still getting the same error message.
> 
> That's really strange.  I have to agree with Bernie that something seems to
> be wrong with the graphic itself.  Can you draw the graphic onto another 
> window?
> 
> Matt Lewis

I'm using "tiles.bmp" in the "demo" directory and it works okay with the demo
"icons_bitmaps.exw"

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu