mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 20:37:39 +00:00
Added display mode and size mode support to the toolbar implementation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19085 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
49bc2ab40b
commit
972d2de54c
9 changed files with 535 additions and 207 deletions
|
@ -36,6 +36,7 @@
|
|||
#include "AppKit/NSToolbarItem.h"
|
||||
#include "AppKit/NSView.h"
|
||||
#include "AppKit/NSWindow.h"
|
||||
#include "AppKit/NSWindow+Toolbar.h"
|
||||
#include "GNUstepGUI/GSToolbarView.h"
|
||||
#include "GNUstepGUI/GSToolbar.h"
|
||||
#include "AppKit/NSToolbar.h"
|
||||
|
@ -77,6 +78,10 @@ static const int current_version = 1;
|
|||
- (void) _setWillBeVisible: (BOOL)willBeVisible;
|
||||
@end
|
||||
|
||||
@interface NSWindow (ToolbarPrivate)
|
||||
- (void) _adjustToolbarView;
|
||||
@end
|
||||
|
||||
// ---
|
||||
|
||||
@implementation NSToolbar
|
||||
|
@ -134,16 +139,6 @@ static const int current_version = 1;
|
|||
|
||||
// Accessors
|
||||
|
||||
- (NSToolbarDisplayMode) displayMode
|
||||
{
|
||||
return _displayMode;
|
||||
}
|
||||
|
||||
- (NSToolbarSizeMode) sizeMode
|
||||
{
|
||||
return _sizeMode;
|
||||
}
|
||||
|
||||
- (BOOL) isVisible
|
||||
{
|
||||
return _visible;
|
||||
|
@ -196,7 +191,8 @@ static const int current_version = 1;
|
|||
{
|
||||
_displayMode = displayMode;
|
||||
|
||||
// do more
|
||||
[_toolbarView _reload];
|
||||
[_window _adjustToolbarView];
|
||||
|
||||
if (broadcast)
|
||||
{
|
||||
|
@ -204,12 +200,13 @@ static const int current_version = 1;
|
|||
}
|
||||
}
|
||||
|
||||
- (void) setSizeMode: (NSToolbarSizeMode)sizeMode
|
||||
broadcast: (BOOL)broadcast
|
||||
- (void) _setSizeMode: (NSToolbarSizeMode)sizeMode
|
||||
broadcast: (BOOL)broadcast
|
||||
{
|
||||
_sizeMode = sizeMode;
|
||||
|
||||
// do more
|
||||
[_toolbarView _reload];
|
||||
[_window _adjustToolbarView];
|
||||
|
||||
if (broadcast)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue