/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / removing the toolbar

Username:     
Password:     
             

Forum

# 1   2009-09-04 06:57:43 removing the toolbar

farmisen
New member
Registered: 2009-04-22
Posts: 3

removing the toolbar

Is there any way to remove the toolbar w/out recompiling circleOS - I tried to call TOOLBAR_Set with a toolbar with 0 buttons but I still have the border of the toolbar drawn on the screen and a beep is played when I click where the button are usually drawn. I need the full screen foot print for my current project and any help for getting that is welcome.
thanks.
f.

Offline

 

# 2   2009-09-04 12:05:03 removing the toolbar

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: removing the toolbar

The toolbar is managed by a handler (TOOLBAR_Handler()). As for the other handlers (that are all defined in a 'virtual table), you can redefine it  by calling the functions UTIL_SetSchHandler/UTIL_GetSchHandler. If you save the original handler (to restore it), replace it by your own toolbar handler (that does do anything), it should work.

Offline

 

# 3   2009-10-10 09:26:00 removing the toolbar

tkj
Member
Registered: 2009-08-21
Posts: 31

Re: removing the toolbar

How is it possible to replace it?
Which code (where) should I change?

Offline

 

# 4   2009-10-13 08:06:29 removing the toolbar

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: removing the toolbar

How is it possible to replace it?

As I said, by using the functions UTIL_SetSchHandler/UTIL_GetSchHandler.
UTIL_GetSchHandler() will allow you to get the address of the default handler (to save when entering into your application), and UTIL_SetSchHandler()  allows to set your own handler and to restore the original one when exiting your application:

Code:

//save handler...
tHandler hdl_save;
hdl_save = UTIL_GetSchHandler(TOOLBAR_SCHHDL_ID);

...
//set new handler
UTIL_SetSchHandler(TOOLBAR_SCHHDL_ID, (tHandler) my_dummy_function );  
//with:  void my_dummy_function (void) { ; }
...
//restore previous handler when exiting (end of the application)
UTIL_SetSchHandler(TOOLBAR_SCHHDL_ID, hdl_save );

Offline

 

Board footer