]>
Commit | Line | Data |
---|---|---|
3582fcbc | 1 | ///////////////////////////////////////////////////////////////////////////// |
88a7a4e1 | 2 | // Name: src/mac/carbon/fontdlgosx.cpp |
3582fcbc RN |
3 | // Purpose: wxFontDialog class. |
4 | // Author: Ryan Norton | |
5 | // Modified by: | |
6 | // Created: 2004-10-03 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Ryan Norton | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
88a7a4e1 WS |
12 | #include "wx/wxprec.h" |
13 | ||
3582fcbc RN |
14 | // =========================================================================== |
15 | // declarations | |
16 | // =========================================================================== | |
17 | ||
18 | // --------------------------------------------------------------------------- | |
19 | // headers | |
20 | // --------------------------------------------------------------------------- | |
21 | ||
e0d8c923 | 22 | #include "wx/fontdlg.h" |
88a7a4e1 WS |
23 | |
24 | #ifndef WX_PRECOMP | |
25 | #include "wx/intl.h" | |
e4db172a | 26 | #include "wx/log.h" |
ce5d92e1 | 27 | #include "wx/cmndata.h" |
88a7a4e1 WS |
28 | #endif |
29 | ||
e0d8c923 | 30 | #include "wx/fontutil.h" |
88a7a4e1 | 31 | |
3582fcbc RN |
32 | // ============================================================================ |
33 | // implementation | |
34 | // ============================================================================ | |
35 | ||
509b4ecc SC |
36 | |
37 | #include "wx/cocoa/autorelease.h" | |
38 | #include "wx/cocoa/string.h" | |
39 | ||
40 | #if wxMAC_USE_EXPERIMENTAL_FONTDIALOG | |
41 | ||
42 | #import <Foundation/Foundation.h> | |
43 | #import <AppKit/AppKit.h> | |
44 | ||
45 | #include "wx/mac/uma.h" | |
46 | ||
47 | @interface wxMacFontPanelAccView : NSView | |
88a7a4e1 | 48 | { |
509b4ecc SC |
49 | BOOL m_okPressed ; |
50 | BOOL m_shouldClose ; | |
51 | NSButton* m_cancelButton ; | |
52 | NSButton* m_okButton ; | |
53 | } | |
54 | ||
55 | - (IBAction)cancelPressed:(id)sender; | |
56 | - (IBAction)okPressed:(id)sender; | |
57 | - (void)resetFlags; | |
58 | - (BOOL)closedWithOk; | |
59 | - (BOOL)shouldCloseCarbon; | |
60 | - (NSButton*)okButton; | |
61 | @end | |
62 | ||
63 | @implementation wxMacFontPanelAccView : NSView | |
64 | - (id)initWithFrame:(NSRect)rectBox | |
65 | { | |
66 | [super initWithFrame:rectBox]; | |
88a7a4e1 | 67 | |
dbe4a80c SC |
68 | wxCFStringRef cfOkString( wxT("OK"), wxLocale::GetSystemEncoding() ); |
69 | wxCFStringRef cfCancelString( wxT("Cancel"), wxLocale::GetSystemEncoding() ); | |
509b4ecc SC |
70 | |
71 | NSRect rectCancel = NSMakeRect( 10.0 , 10.0 , 82 , 24 ); | |
72 | NSRect rectOK = NSMakeRect( 100.0 , 10.0 , 82 , 24 ); | |
88a7a4e1 | 73 | |
509b4ecc | 74 | NSButton* cancelButton = [[NSButton alloc] initWithFrame:rectCancel]; |
dbe4a80c | 75 | [cancelButton setTitle:(NSString*)wxCFRetain((CFStringRef)cfCancelString)]; |
509b4ecc SC |
76 | [cancelButton setBezelStyle:NSRoundedBezelStyle]; |
77 | [cancelButton setButtonType:NSMomentaryPushInButton]; | |
78 | [cancelButton setAction:@selector(cancelPressed:)]; | |
79 | [cancelButton setTarget:self]; | |
80 | m_cancelButton = cancelButton ; | |
88a7a4e1 | 81 | |
509b4ecc | 82 | NSButton* okButton = [[NSButton alloc] initWithFrame:rectOK]; |
dbe4a80c | 83 | [okButton setTitle:(NSString*)wxCFRetain((CFStringRef)cfOkString)]; |
509b4ecc SC |
84 | [okButton setBezelStyle:NSRoundedBezelStyle]; |
85 | [okButton setButtonType:NSMomentaryPushInButton]; | |
86 | [okButton setAction:@selector(okPressed:)]; | |
87 | [okButton setTarget:self]; | |
88 | // doesn't help either, the button is not highlighted after a color dialog has been used | |
89 | // [okButton setKeyEquivalent:@"\r"]; | |
90 | m_okButton = okButton ; | |
91 | ||
92 | ||
93 | [self addSubview:cancelButton]; | |
94 | [self addSubview:okButton]; | |
88a7a4e1 | 95 | |
509b4ecc SC |
96 | [self resetFlags]; |
97 | return self; | |
98 | } | |
99 | ||
100 | - (void)resetFlags | |
101 | { | |
102 | m_okPressed = NO ; | |
88a7a4e1 | 103 | m_shouldClose = NO ; |
509b4ecc SC |
104 | } |
105 | ||
106 | - (IBAction)cancelPressed:(id)sender | |
107 | { | |
89954433 | 108 | wxUnusedVar(sender); |
509b4ecc SC |
109 | m_shouldClose = YES ; |
110 | [NSApp stopModal]; | |
111 | } | |
112 | ||
113 | - (IBAction)okPressed:(id)sender | |
114 | { | |
89954433 | 115 | wxUnusedVar(sender); |
509b4ecc SC |
116 | m_okPressed = YES ; |
117 | m_shouldClose = YES ; | |
118 | [NSApp stopModal]; | |
119 | } | |
120 | ||
121 | -(BOOL)closedWithOk | |
122 | { | |
123 | return m_okPressed ; | |
124 | } | |
125 | ||
126 | -(BOOL)shouldCloseCarbon | |
127 | { | |
128 | return m_shouldClose ; | |
129 | } | |
130 | ||
131 | -(NSButton*)okButton | |
132 | { | |
133 | return m_okButton ; | |
134 | } | |
135 | @end | |
136 | ||
137 | ||
138 | extern "C" int RunMixedFontDialog(wxFontDialog* dialog) ; | |
139 | ||
89954433 | 140 | int RunMixedFontDialog(wxFontDialog* WXUNUSED(dialog)) |
509b4ecc SC |
141 | { |
142 | int retval = wxID_CANCEL ; | |
143 | ||
947f3b35 VZ |
144 | if ( !NSApplicationLoad() ) |
145 | { | |
146 | wxFAIL_MSG("Couldn't load Cocoa in Carbon Environment"); | |
147 | } | |
509b4ecc SC |
148 | |
149 | wxAutoNSAutoreleasePool pool; | |
150 | ||
151 | // setting up the ok/cancel buttons | |
152 | NSFontPanel* fontPanel = [NSFontPanel sharedFontPanel] ; | |
153 | ||
154 | // adjust modality for carbon environment | |
155 | WindowRef carbonWindowRef = (WindowRef)[fontPanel windowRef] ; | |
156 | SetWindowModality(carbonWindowRef, kWindowModalityAppModal , 0) ; | |
157 | SetWindowGroup(carbonWindowRef , GetWindowGroupOfClass(kMovableModalWindowClass)); | |
88a7a4e1 | 158 | |
509b4ecc | 159 | [fontPanel setFloatingPanel:NO] ; |
5cd47bd7 | 160 | [[fontPanel standardWindowButton:NSWindowCloseButton] setEnabled:NO] ; |
88a7a4e1 | 161 | |
509b4ecc SC |
162 | wxMacFontPanelAccView* accessoryView = (wxMacFontPanelAccView*) [fontPanel accessoryView] ; |
163 | if ( accessoryView == nil) | |
164 | { | |
165 | NSRect rectBox = NSMakeRect( 0 , 0 , 192 , 40 ); | |
166 | accessoryView = [[wxMacFontPanelAccView alloc] initWithFrame:rectBox]; | |
167 | [fontPanel setAccessoryView:accessoryView]; | |
88a7a4e1 | 168 | |
509b4ecc SC |
169 | [fontPanel setDefaultButtonCell:[[accessoryView okButton] cell]] ; |
170 | } | |
171 | ||
172 | [accessoryView resetFlags]; | |
88a7a4e1 | 173 | |
509b4ecc SC |
174 | NSModalSession session = [NSApp beginModalSessionForWindow:fontPanel]; |
175 | ||
176 | [NSApp runModalSession:session]; | |
177 | ||
178 | [NSApp endModalSession:session]; | |
179 | ||
5cd47bd7 SC |
180 | // if we don't reenable it, FPShowHideFontPanel does not work |
181 | [[fontPanel standardWindowButton:NSWindowCloseButton] setEnabled:YES] ; | |
509b4ecc SC |
182 | if( FPIsFontPanelVisible()) |
183 | FPShowHideFontPanel() ; | |
88a7a4e1 | 184 | |
509b4ecc SC |
185 | if ( [accessoryView closedWithOk]) |
186 | { | |
187 | retval = wxID_OK ; | |
188 | } | |
189 | ||
190 | ||
191 | return retval ; | |
192 | } | |
193 | ||
194 | #else | |
195 | ||
356c775f | 196 | #if USE_NATIVE_FONT_DIALOG_FOR_MACOSX |
3582fcbc | 197 | |
4e69ff22 | 198 | IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog) |
4e69ff22 | 199 | |
3582fcbc | 200 | // Cocoa headers |
3582fcbc RN |
201 | |
202 | #import <AppKit/NSFont.h> | |
203 | #import <AppKit/NSFontManager.h> | |
204 | #import <AppKit/NSFontPanel.h> | |
205 | #import <AppKit/NSColor.h> | |
206 | #import <AppKit/NSColorPanel.h> | |
207 | ||
208 | // --------------------------------------------------------------------------- | |
209 | // wxWCDelegate - Window Closed delegate | |
210 | // --------------------------------------------------------------------------- | |
211 | ||
212 | @interface wxWCDelegate : NSObject | |
213 | { | |
214 | bool m_bIsClosed; | |
215 | } | |
216 | ||
217 | // Delegate methods | |
218 | - (id)init; | |
219 | - (BOOL)windowShouldClose:(id)sender; | |
220 | - (BOOL)isClosed; | |
221 | @end // interface wxNSFontPanelDelegate : NSObject | |
222 | ||
223 | @implementation wxWCDelegate : NSObject | |
224 | ||
225 | - (id)init | |
226 | { | |
227 | [super init]; | |
228 | m_bIsClosed = false; | |
229 | ||
230 | return self; | |
231 | } | |
232 | ||
233 | - (BOOL)windowShouldClose:(id)sender | |
234 | { | |
235 | m_bIsClosed = true; | |
88a7a4e1 | 236 | |
3582fcbc RN |
237 | [NSApp abortModal]; |
238 | [NSApp stopModal]; | |
239 | return YES; | |
240 | } | |
241 | ||
242 | - (BOOL)isClosed | |
243 | { | |
244 | return m_bIsClosed; | |
245 | } | |
246 | ||
247 | @end // wxNSFontPanelDelegate | |
248 | ||
249 | // --------------------------------------------------------------------------- | |
250 | // wxWCODelegate - Window Closed or Open delegate | |
251 | // --------------------------------------------------------------------------- | |
252 | ||
253 | @interface wxWCODelegate : NSObject | |
254 | { | |
255 | bool m_bIsClosed; | |
256 | bool m_bIsOpen; | |
257 | } | |
258 | ||
259 | // Delegate methods | |
260 | - (id)init; | |
261 | - (BOOL)windowShouldClose:(id)sender; | |
262 | - (void)windowDidUpdate:(NSNotification *)aNotification; | |
263 | - (BOOL)isClosed; | |
264 | - (BOOL)isOpen; | |
265 | @end // interface wxNSFontPanelDelegate : NSObject | |
266 | ||
267 | @implementation wxWCODelegate : NSObject | |
268 | ||
269 | - (id)init | |
270 | { | |
271 | [super init]; | |
272 | m_bIsClosed = false; | |
273 | m_bIsOpen = false; | |
274 | ||
275 | return self; | |
276 | } | |
277 | ||
278 | - (BOOL)windowShouldClose:(id)sender | |
279 | { | |
280 | m_bIsClosed = true; | |
281 | m_bIsOpen = false; | |
88a7a4e1 | 282 | |
3582fcbc RN |
283 | [NSApp abortModal]; |
284 | [NSApp stopModal]; | |
285 | return YES; | |
286 | } | |
287 | ||
288 | - (void)windowDidUpdate:(NSNotification *)aNotification | |
289 | { | |
290 | if (m_bIsOpen == NO) | |
291 | { | |
292 | m_bIsClosed = false; | |
293 | m_bIsOpen = true; | |
294 | ||
295 | [NSApp abortModal]; | |
296 | [NSApp stopModal]; | |
297 | } | |
298 | } | |
299 | ||
300 | - (BOOL)isClosed | |
301 | { | |
302 | return m_bIsClosed; | |
303 | } | |
304 | ||
305 | - (BOOL)isOpen | |
306 | { | |
307 | return m_bIsOpen; | |
308 | } | |
309 | ||
310 | @end // wxNSFontPanelDelegate | |
311 | ||
312 | // --------------------------------------------------------------------------- | |
313 | // wxFontDialog | |
314 | // --------------------------------------------------------------------------- | |
315 | ||
316 | wxFontDialog::wxFontDialog() | |
317 | { | |
318 | } | |
319 | ||
320 | wxFontDialog::wxFontDialog(wxWindow *parent, const wxFontData& data) | |
321 | { | |
322 | Create(parent, data); | |
323 | } | |
324 | ||
325 | wxFontDialog::~wxFontDialog() | |
326 | { | |
327 | } | |
328 | ||
329 | bool wxFontDialog::Create(wxWindow *parent, const wxFontData& data) | |
330 | { | |
331 | m_fontData = data; | |
332 | ||
333 | // | |
88a7a4e1 WS |
334 | // This is the key call - this initializes |
335 | // events and window stuff for cocoa for carbon | |
336 | // applications. | |
3582fcbc | 337 | // |
88a7a4e1 WS |
338 | // This is also the only call here that is |
339 | // 10.2+ specific (the rest is OSX only), | |
340 | // which, ironically, the carbon font | |
341 | // panel requires. | |
3582fcbc RN |
342 | // |
343 | bool bOK = NSApplicationLoad(); | |
344 | ||
345 | //autorelease pool - req'd for carbon | |
346 | NSAutoreleasePool *thePool; | |
347 | thePool = [[NSAutoreleasePool alloc] init]; | |
348 | ||
349 | //Get the initial wx font | |
350 | wxFont& thewxfont = m_fontData.m_initialFont; | |
88a7a4e1 WS |
351 | |
352 | //if the font is valid set the default (selected) font of the | |
3582fcbc RN |
353 | //NSFontDialog to that font |
354 | if (thewxfont.Ok()) | |
355 | { | |
356 | NSFontTraitMask theMask = 0; | |
88a7a4e1 | 357 | |
3582fcbc RN |
358 | if(thewxfont.GetStyle() == wxFONTSTYLE_ITALIC) |
359 | theMask |= NSItalicFontMask; | |
88a7a4e1 | 360 | |
3582fcbc RN |
361 | if(thewxfont.IsFixedWidth()) |
362 | theMask |= NSFixedPitchFontMask; | |
363 | ||
88a7a4e1 | 364 | NSFont* theDefaultFont = |
3582fcbc RN |
365 | [[NSFontManager sharedFontManager] fontWithFamily: |
366 | wxNSStringWithWxString(thewxfont.GetFaceName()) | |
367 | traits:theMask | |
368 | weight:thewxfont.GetWeight() == wxBOLD ? 9 : | |
369 | thewxfont.GetWeight() == wxLIGHT ? 0 : 5 | |
370 | size: (float)(thewxfont.GetPointSize()) | |
371 | ]; | |
88a7a4e1 | 372 | |
3582fcbc | 373 | wxASSERT_MSG(theDefaultFont, wxT("Invalid default font for wxCocoaFontDialog!")); |
53638fe0 RN |
374 | |
375 | //Apple docs say to call NSFontManager::setSelectedFont | |
376 | //However, 10.3 doesn't seem to create the font panel | |
377 | //is this is done, so create it ourselves | |
378 | [[NSFontPanel sharedFontPanel] setPanelFont:theDefaultFont isMultiple:NO]; | |
3582fcbc RN |
379 | |
380 | } | |
381 | ||
382 | if(m_fontData.m_fontColour.Ok()) | |
383 | [[NSColorPanel sharedColorPanel] setColor: | |
384 | [NSColor colorWithCalibratedRed:m_fontData.m_fontColour.Red() / 255.0 | |
18f8d063 RN |
385 | green:m_fontData.m_fontColour.Green() / 255.0 |
386 | blue:m_fontData.m_fontColour.Blue() / 255.0 | |
3582fcbc RN |
387 | alpha:1.0] |
388 | ]; | |
389 | else | |
88a7a4e1 WS |
390 | [[NSColorPanel sharedColorPanel] setColor:[NSColor blackColor]]; |
391 | ||
3582fcbc RN |
392 | //We're done - free up the pool |
393 | [thePool release]; | |
88a7a4e1 | 394 | |
3582fcbc RN |
395 | return bOK; |
396 | } | |
397 | ||
398 | int wxFontDialog::ShowModal() | |
88a7a4e1 WS |
399 | { |
400 | //Start the pool. Required for carbon interaction | |
3582fcbc RN |
401 | //(For those curious, the only thing that happens |
402 | //if you don't do this is a bunch of error | |
403 | //messages about leaks on the console, | |
404 | //with no windows shown or anything). | |
405 | NSAutoreleasePool *thePool; | |
406 | thePool = [[NSAutoreleasePool alloc] init]; | |
407 | ||
408 | //Get the shared color and font panel | |
88a7a4e1 | 409 | NSFontPanel* theFontPanel = [NSFontPanel sharedFontPanel]; |
3582fcbc RN |
410 | NSColorPanel* theColorPanel = [NSColorPanel sharedColorPanel]; |
411 | ||
412 | //Create and assign the delegates (cocoa event handlers) so | |
413 | //we can tell if a window has closed/open or not | |
414 | wxWCDelegate* theFPDelegate = [[wxWCDelegate alloc] init]; | |
415 | [theFontPanel setDelegate:theFPDelegate]; | |
416 | ||
417 | wxWCODelegate* theCPDelegate = [[wxWCODelegate alloc] init]; | |
418 | [theColorPanel setDelegate:theCPDelegate]; | |
88a7a4e1 | 419 | |
3582fcbc | 420 | // |
88a7a4e1 | 421 | // Begin the modal loop for the font and color panels |
3582fcbc | 422 | // |
88a7a4e1 | 423 | // The idea is that we first make the font panel modal, |
3582fcbc RN |
424 | // but if the color panel is opened, unless we stop the |
425 | // modal loop the color panel opens behind the font panel | |
426 | // with no input acceptable to it - which makes it useless. | |
427 | // | |
88a7a4e1 WS |
428 | // So we set up delegates for both the color and font panels, |
429 | // and the if the font panel opens the color panel, we | |
3103e8a9 | 430 | // stop the modal loop, and start a separate modal loop for |
3582fcbc RN |
431 | // the color panel until the color panel closes, switching |
432 | // back to the font panel modal loop once it does close. | |
433 | // | |
434 | do | |
435 | { | |
436 | // | |
88a7a4e1 | 437 | // Start the font panel modal loop |
3582fcbc RN |
438 | // |
439 | NSModalSession session = [NSApp beginModalSessionForWindow:theFontPanel]; | |
88a7a4e1 | 440 | for (;;) |
3582fcbc RN |
441 | { |
442 | [NSApp runModalSession:session]; | |
88a7a4e1 | 443 | |
3582fcbc RN |
444 | //If the font panel is closed or the font panel |
445 | //opened the color panel, break | |
446 | if ([theFPDelegate isClosed] || [theCPDelegate isOpen]) | |
447 | break; | |
448 | } | |
449 | [NSApp endModalSession:session]; | |
88a7a4e1 | 450 | |
3582fcbc RN |
451 | //is the color panel open? |
452 | if ([theCPDelegate isOpen]) | |
453 | { | |
454 | // | |
88a7a4e1 | 455 | // Start the color panel modal loop |
3582fcbc RN |
456 | // |
457 | NSModalSession session = [NSApp beginModalSessionForWindow:theColorPanel]; | |
88a7a4e1 | 458 | for (;;) |
3582fcbc RN |
459 | { |
460 | [NSApp runModalSession:session]; | |
88a7a4e1 | 461 | |
3582fcbc RN |
462 | //If the color panel is closed, return the font panel modal loop |
463 | if ([theCPDelegate isClosed]) | |
464 | break; | |
465 | } | |
466 | [NSApp endModalSession:session]; | |
467 | } | |
468 | //If the font panel is still alive (I.E. we broke | |
469 | //out of its modal loop because the color panel was | |
470 | //opened) return the font panel modal loop | |
471 | }while([theFPDelegate isClosed] == NO); | |
88a7a4e1 | 472 | |
3582fcbc RN |
473 | //free up the memory for the delegates - we don't need them anymore |
474 | [theFPDelegate release]; | |
475 | [theCPDelegate release]; | |
88a7a4e1 | 476 | |
3582fcbc | 477 | //Get the font the user selected |
88a7a4e1 WS |
478 | NSFont* theFont = [theFontPanel panelConvertFont:[NSFont userFontOfSize:0]]; |
479 | ||
3582fcbc RN |
480 | //Get more information about the user's chosen font |
481 | NSFontTraitMask theTraits = [[NSFontManager sharedFontManager] traitsOfFont:theFont]; | |
482 | int theFontWeight = [[NSFontManager sharedFontManager] weightOfFont:theFont]; | |
483 | int theFontSize = (int) [theFont pointSize]; | |
88a7a4e1 | 484 | |
3582fcbc RN |
485 | //Set the wx font to the appropriate data |
486 | if(theTraits & NSFixedPitchFontMask) | |
487 | m_fontData.m_chosenFont.SetFamily(wxTELETYPE); | |
88a7a4e1 | 488 | |
3582fcbc RN |
489 | m_fontData.m_chosenFont.SetFaceName(wxStringWithNSString([theFont familyName])); |
490 | m_fontData.m_chosenFont.SetPointSize(theFontSize); | |
491 | m_fontData.m_chosenFont.SetStyle(theTraits & NSItalicFontMask ? wxFONTSTYLE_ITALIC : 0); | |
492 | m_fontData.m_chosenFont.SetWeight(theFontWeight < 5 ? wxLIGHT : | |
88a7a4e1 WS |
493 | theFontWeight >= 9 ? wxBOLD : wxNORMAL); |
494 | ||
3582fcbc RN |
495 | //Get the shared color panel along with the chosen color and set the chosen color |
496 | NSColor* theColor = [[theColorPanel color] colorUsingColorSpaceName:NSCalibratedRGBColorSpace]; | |
88a7a4e1 | 497 | |
3582fcbc RN |
498 | m_fontData.m_fontColour.Set((unsigned char) ([theColor redComponent] * 255.0), |
499 | (unsigned char) ([theColor greenComponent] * 255.0), | |
500 | (unsigned char) ([theColor blueComponent] * 255.0)); | |
501 | ||
502 | //Friendly debug stuff | |
503 | #ifdef FONTDLGDEBUG | |
88a7a4e1 WS |
504 | wxPrintf(wxT("---Font Panel---\n--NS--\nSize:%f\nWeight:%i\nTraits:%i\n--WX--\nFaceName:%s\nPointSize:%i\nStyle:%i\nWeight:%i\nColor:%i,%i,%i\n---END Font Panel---\n"), |
505 | ||
3582fcbc RN |
506 | (float) theFontSize, |
507 | theFontWeight, | |
508 | theTraits, | |
88a7a4e1 | 509 | |
3582fcbc RN |
510 | m_fontData.m_chosenFont.GetFaceName().c_str(), |
511 | m_fontData.m_chosenFont.GetPointSize(), | |
512 | m_fontData.m_chosenFont.GetStyle(), | |
513 | m_fontData.m_chosenFont.GetWeight(), | |
88a7a4e1 WS |
514 | m_fontData.m_fontColour.Red(), |
515 | m_fontData.m_fontColour.Green(), | |
3582fcbc RN |
516 | m_fontData.m_fontColour.Blue() ); |
517 | #endif | |
518 | ||
519 | //Release the pool, we're done :) | |
520 | [thePool release]; | |
521 | ||
522 | //Return ID_OK - there are no "apply" buttons or the like | |
523 | //on either the font or color panel | |
524 | return wxID_OK; | |
525 | } | |
526 | ||
527 | //old api stuff (REMOVE ME) | |
528 | bool wxFontDialog::IsShown() const | |
529 | { | |
530 | return false; | |
531 | } | |
532 | ||
3582fcbc | 533 | #endif // 10.2+ |
509b4ecc SC |
534 | |
535 | #endif |