Remove trailing white-space
This commit is contained in:
@@ -128,7 +128,7 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil;
|
|||||||
|
|
||||||
@implementation wxTextEntryFormatter
|
@implementation wxTextEntryFormatter
|
||||||
|
|
||||||
- (id)init
|
- (id)init
|
||||||
{
|
{
|
||||||
if ( self = [super init] )
|
if ( self = [super init] )
|
||||||
{
|
{
|
||||||
@@ -138,7 +138,7 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil;
|
|||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setMaxLength:(int) maxlen
|
- (void) setMaxLength:(int) maxlen
|
||||||
{
|
{
|
||||||
maxLength = maxlen;
|
maxLength = maxlen;
|
||||||
}
|
}
|
||||||
@@ -155,13 +155,13 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil;
|
|||||||
return [NSString stringWithString:anObject];
|
return [NSString stringWithString:anObject];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)getObjectValue:(id *)obj forString:(NSString *)string errorDescription:(NSString **)error
|
- (BOOL)getObjectValue:(id *)obj forString:(NSString *)string errorDescription:(NSString **)error
|
||||||
{
|
{
|
||||||
*obj = [NSString stringWithString:string];
|
*obj = [NSString stringWithString:string];
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)isPartialStringValid:(NSString **)partialStringPtr proposedSelectedRange:(NSRangePointer)proposedSelRangePtr
|
- (BOOL)isPartialStringValid:(NSString **)partialStringPtr proposedSelectedRange:(NSRangePointer)proposedSelRangePtr
|
||||||
originalString:(NSString *)origString originalSelectedRange:(NSRange)origSelRange errorDescription:(NSString **)error
|
originalString:(NSString *)origString originalSelectedRange:(NSRange)origSelRange errorDescription:(NSString **)error
|
||||||
{
|
{
|
||||||
if ( maxLength > 0 )
|
if ( maxLength > 0 )
|
||||||
@@ -226,9 +226,9 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil;
|
|||||||
- (BOOL)control:(NSControl*)control textView:(NSTextView*)textView doCommandBySelector:(SEL)commandSelector
|
- (BOOL)control:(NSControl*)control textView:(NSTextView*)textView doCommandBySelector:(SEL)commandSelector
|
||||||
{
|
{
|
||||||
wxUnusedVar(textView);
|
wxUnusedVar(textView);
|
||||||
|
|
||||||
BOOL handled = NO;
|
BOOL handled = NO;
|
||||||
|
|
||||||
wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( control );
|
wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( control );
|
||||||
if ( impl )
|
if ( impl )
|
||||||
{
|
{
|
||||||
@@ -322,7 +322,7 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return handled;
|
return handled;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -406,7 +406,7 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil;
|
|||||||
BOOL r = [super becomeFirstResponder];
|
BOOL r = [super becomeFirstResponder];
|
||||||
if ( impl != NULL && r )
|
if ( impl != NULL && r )
|
||||||
impl->DoNotifyFocusSet();
|
impl->DoNotifyFocusSet();
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -653,11 +653,11 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil;
|
|||||||
{
|
{
|
||||||
wxUnusedVar(textView);
|
wxUnusedVar(textView);
|
||||||
wxUnusedVar(control);
|
wxUnusedVar(control);
|
||||||
|
|
||||||
BOOL handled = NO;
|
BOOL handled = NO;
|
||||||
|
|
||||||
// send back key events wx' common code knows how to handle
|
// send back key events wx' common code knows how to handle
|
||||||
|
|
||||||
wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
|
wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
|
||||||
if ( impl )
|
if ( impl )
|
||||||
{
|
{
|
||||||
@@ -681,7 +681,7 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return handled;
|
return handled;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -740,7 +740,7 @@ wxNSTextViewControl::wxNSTextViewControl( wxTextCtrl *wxPeer, WXWidget w, long s
|
|||||||
[tv setVerticallyResizable:YES];
|
[tv setVerticallyResizable:YES];
|
||||||
[tv setHorizontallyResizable:hasHScroll];
|
[tv setHorizontallyResizable:hasHScroll];
|
||||||
[tv setAutoresizingMask:NSViewWidthSizable];
|
[tv setAutoresizingMask:NSViewWidthSizable];
|
||||||
|
|
||||||
if ( hasHScroll )
|
if ( hasHScroll )
|
||||||
{
|
{
|
||||||
[[tv textContainer] setContainerSize:NSMakeSize(MAX_WIDTH, MAX_WIDTH)];
|
[[tv textContainer] setContainerSize:NSMakeSize(MAX_WIDTH, MAX_WIDTH)];
|
||||||
@@ -1036,14 +1036,14 @@ void wxNSTextViewControl::SetFont( const wxFont & font , const wxColour& WXUNUSE
|
|||||||
bool wxNSTextViewControl::GetStyle(long position, wxTextAttr& style)
|
bool wxNSTextViewControl::GetStyle(long position, wxTextAttr& style)
|
||||||
{
|
{
|
||||||
if (m_textView && position >=0)
|
if (m_textView && position >=0)
|
||||||
{
|
{
|
||||||
NSFont* font = NULL;
|
NSFont* font = NULL;
|
||||||
NSColor* bgcolor = NULL;
|
NSColor* bgcolor = NULL;
|
||||||
NSColor* fgcolor = NULL;
|
NSColor* fgcolor = NULL;
|
||||||
// NOTE: It appears that other platforms accept GetStyle with the position == length
|
// NOTE: It appears that other platforms accept GetStyle with the position == length
|
||||||
// but that NSTextStorage does not accept length as a valid position.
|
// but that NSTextStorage does not accept length as a valid position.
|
||||||
// Therefore we return the default control style in that case.
|
// Therefore we return the default control style in that case.
|
||||||
if (position < (long) [[m_textView string] length])
|
if (position < (long) [[m_textView string] length])
|
||||||
{
|
{
|
||||||
NSTextStorage* storage = [m_textView textStorage];
|
NSTextStorage* storage = [m_textView textStorage];
|
||||||
font = [storage attribute:NSFontAttributeName atIndex:position effectiveRange:NULL];
|
font = [storage attribute:NSFontAttributeName atIndex:position effectiveRange:NULL];
|
||||||
@@ -1057,13 +1057,13 @@ bool wxNSTextViewControl::GetStyle(long position, wxTextAttr& style)
|
|||||||
bgcolor = [attrs objectForKey:NSBackgroundColorAttributeName];
|
bgcolor = [attrs objectForKey:NSBackgroundColorAttributeName];
|
||||||
fgcolor = [attrs objectForKey:NSForegroundColorAttributeName];
|
fgcolor = [attrs objectForKey:NSForegroundColorAttributeName];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (font)
|
if (font)
|
||||||
style.SetFont(wxFont(font));
|
style.SetFont(wxFont(font));
|
||||||
|
|
||||||
if (bgcolor)
|
if (bgcolor)
|
||||||
style.SetBackgroundColour(wxColour(bgcolor));
|
style.SetBackgroundColour(wxColour(bgcolor));
|
||||||
|
|
||||||
if (fgcolor)
|
if (fgcolor)
|
||||||
style.SetTextColour(wxColour(fgcolor));
|
style.SetTextColour(wxColour(fgcolor));
|
||||||
return true;
|
return true;
|
||||||
@@ -1161,7 +1161,7 @@ void wxNSTextViewControl::SetStyle(long start,
|
|||||||
[dict release];
|
[dict release];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( style.HasAlignment() )
|
if ( style.HasAlignment() )
|
||||||
{
|
{
|
||||||
switch ( style.GetAlignment() )
|
switch ( style.GetAlignment() )
|
||||||
@@ -1565,7 +1565,7 @@ wxWidgetImplType* wxWidgetImpl::CreateTextControl( wxTextCtrl* wxpeer,
|
|||||||
{
|
{
|
||||||
[v setAlignment:NSCenterTextAlignment];
|
[v setAlignment:NSCenterTextAlignment];
|
||||||
}
|
}
|
||||||
|
|
||||||
NSTextFieldCell* cell = [v cell];
|
NSTextFieldCell* cell = [v cell];
|
||||||
[cell setWraps:NO];
|
[cell setWraps:NO];
|
||||||
[cell setScrollable:YES];
|
[cell setScrollable:YES];
|
||||||
|
Reference in New Issue
Block a user