aboutsummaryrefslogtreecommitdiff
path: root/ostoolbar.dcl
blob: ba46a84919dab0baafdba5124f00d812b6348ad4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
definition module ostoolbar

//	Clean object I/O library, version 1.2

//	Operations to add and remove tools.

import osbitmap, ostoolbox, ostypes

::	OSToolbar
	=	{	toolbarPtr		:: !OSToolbarHandle		// The toolbar of the frame window (zero if no toolbar)
		,	toolbarHeight	:: !Int					// The height of the toolbar       (zero if no toolbar)
		}
::	OSToolbarHandle
	:==	OSWindowPtr

OSdefaultToolbarHeight :== 16	// The default height of the toolbar

/*	osCreateToolbar forMDI wPtr (width,height)
		creates a toolbar in the argument window that contains buttons of the given width and height. 
		The forMDI is True in case the toolbar must be created for a MDI process, and False otherwise.
		The return Int is the actual height of the toolbar.
	osCreateBitmapToolbarItem toolbarPtr bitmap index
		adds a button with the given bitmap to the toolbar. The index must be the button item number.
	osCreateToolbarSeparator toolbarPtr
		adds a separator to the toolbar.
*/
osCreateToolbar				:: !Bool !OSWindowPtr !(!Int,!Int)	!*OSToolbox -> (!(!OSToolbarHandle,!Int),!*OSToolbox)
osCreateBitmapToolbarItem	:: !OSToolbarHandle !OSBitmap !Int	!*OSToolbox -> *OSToolbox
osCreateToolbarSeparator	:: !OSToolbarHandle					!*OSToolbox -> *OSToolbox