2003-08-24 17:22:11 +00:00
|
|
|
/*
|
|
|
|
<title>GSToolbarView.h</title>
|
|
|
|
|
|
|
|
<abstract>The private toolbar class which draws the actual toolbar.</abstract>
|
|
|
|
|
|
|
|
Copyright (C) 2002 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
Author: Gregory John Casamento <greg_casamento@yahoo.com>,
|
2004-03-12 22:55:02 +00:00
|
|
|
Fabien Vallon <fabien.vallon@fr.alcove.com>,
|
|
|
|
Quentin Mathe <qmathe@club-internet.fr>
|
2003-08-24 17:22:11 +00:00
|
|
|
Date: May 2002
|
|
|
|
|
|
|
|
This file is part of the GNUstep GUI Library.
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
2007-10-29 21:16:17 +00:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
2003-08-24 17:22:11 +00:00
|
|
|
License as published by the Free Software Foundation; either
|
2008-06-10 04:01:49 +00:00
|
|
|
version 2 of the License, or (at your option) any later version.
|
2007-10-29 21:16:17 +00:00
|
|
|
|
2003-08-24 17:22:11 +00:00
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2007-10-29 21:16:17 +00:00
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Lesser General Public License for more details.
|
2003-08-24 17:22:11 +00:00
|
|
|
|
2007-10-29 21:16:17 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2003-08-24 17:22:11 +00:00
|
|
|
License along with this library; see the file COPYING.LIB.
|
2007-10-29 21:16:17 +00:00
|
|
|
If not, see <http://www.gnu.org/licenses/> or write to the
|
|
|
|
Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
|
|
|
Boston, MA 02110-1301, USA.
|
2003-08-24 17:22:11 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _GSToolbarView_h_INCLUDE
|
|
|
|
#define _GSToolbarView_h_INCLUDE
|
|
|
|
|
2010-04-07 08:59:43 +00:00
|
|
|
#import <Foundation/NSGeometry.h>
|
|
|
|
#import <AppKit/NSView.h>
|
|
|
|
#import <AppKit/NSColor.h>
|
2004-02-25 03:27:23 +00:00
|
|
|
|
|
|
|
@class NSMutableArray;
|
|
|
|
@class NSClipView;
|
2009-01-02 17:24:06 +00:00
|
|
|
@class NSToolbar;
|
2004-05-18 19:35:58 +00:00
|
|
|
@class NSToolbarItem;
|
2004-02-25 03:27:23 +00:00
|
|
|
@class GSToolbarClippedItemsButton;
|
|
|
|
|
2004-07-27 15:15:29 +00:00
|
|
|
typedef enum {
|
2004-02-25 03:27:23 +00:00
|
|
|
GSToolbarViewNoBorder = 0,
|
|
|
|
GSToolbarViewRightBorder = 2,
|
|
|
|
GSToolbarViewLeftBorder = 4,
|
|
|
|
GSToolbarViewTopBorder = 8,
|
|
|
|
GSToolbarViewBottomBorder = 16
|
2004-07-27 15:15:29 +00:00
|
|
|
} GSToolbarViewBorder;
|
2003-08-24 17:22:11 +00:00
|
|
|
|
|
|
|
@interface GSToolbarView : NSView
|
|
|
|
{
|
2009-01-01 22:04:38 +00:00
|
|
|
NSToolbar *_toolbar;
|
2009-01-02 14:05:39 +00:00
|
|
|
NSClipView *_clipView;
|
2004-02-25 03:27:23 +00:00
|
|
|
GSToolbarClippedItemsButton *_clippedItemsMark;
|
|
|
|
unsigned int _borderMask;
|
2004-05-23 18:22:45 +00:00
|
|
|
NSRect _rectAvailable;
|
2004-09-05 17:56:11 +00:00
|
|
|
float _heightFromLayout;
|
2003-08-24 17:22:11 +00:00
|
|
|
}
|
2004-02-25 03:27:23 +00:00
|
|
|
|
2010-04-13 21:38:31 +00:00
|
|
|
+ (int) draggedItemIndex;
|
|
|
|
+ (void) setDraggedItemIndex:(int)sourceIndex;
|
|
|
|
|
2004-04-13 13:12:53 +00:00
|
|
|
- (id) initWithFrame: (NSRect)frame;
|
2004-02-25 03:27:23 +00:00
|
|
|
|
|
|
|
// Accessors
|
2009-01-01 22:04:38 +00:00
|
|
|
- (NSToolbar *) toolbar;
|
|
|
|
- (void) setToolbar: (NSToolbar *)toolbar;
|
2004-02-25 03:27:23 +00:00
|
|
|
- (unsigned int) borderMask;
|
|
|
|
- (void) setBorderMask: (unsigned int)borderMask;
|
2003-08-24 17:22:11 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2004-05-18 19:35:58 +00:00
|
|
|
// Toolbar related NSColor methods
|
2005-01-21 09:32:50 +00:00
|
|
|
@interface NSColor (GSToolbarViewAdditions)
|
2004-05-18 19:35:58 +00:00
|
|
|
+ (NSColor *) toolbarBackgroundColor;
|
|
|
|
+ (NSColor *) toolbarBorderColor;
|
|
|
|
@end
|
|
|
|
|
2003-08-24 17:22:11 +00:00
|
|
|
#endif
|