Adding button styles to cocoa.macos.m?
BlitzMax Forums/BlitzMax Programming/Adding button styles to cocoa.macos.m?
| ||
Well, I'm doing something I probably shouldn't, but I just can't help myself! :-) I've poking around in cocoa.macos.m around line 1618, and I want to add a few buttons styles. First one is "NSTexturedSquareBezelStyle" which does work, as I already tried it by replacing "BUTTON_PUSH"'s style with the "NSTexturedSquareBezelStyle" style. Kind of cool seeing the metal button style on a BlitzMax app :-) But! If I try to add if (style==BUTTON_METAL) [button setBezelStyle:NSTexturedSquareBezelStyle]; I get an notice that I must declare BUTTON_METAL. So I opened up maxgui.h and added #define BUTTON_METAL 6 just after #define BUTTON_PUSH 1 #define BUTTON_CHECKBOX 2 #define BUTTON_RADIO 3 #define BUTTON_OK 4 #define BUTTON_CANCEL 5 and of course, it didn't work :-( I tried browsing around the mods and sources a bit to see if I could find any other references to the buttons, but can't find anything. Does anyone know what else I need to do, to get the additional style working without having to replace a current style? Thanks for any help or info, -Garrett |
| ||
You may also need to add a const definition in maxgui/gadget.bmx. |
| ||
I should mention that I did rebuild modules afterwards. -Garrett |
| ||
gadget.bmx... Ok, thanks skidracer :-) -Garrett |
| ||
Initial try shows no results, so instead of just rebuilding the module in question, i'm rebuilding all modules right now. -Garrett |
| ||
Well, I must be missing something else in another source file somewhere. Any other suggested files to look into? Thanks a bunch, -Garrett |
| ||
Buy checking out NSButtonCell.h in the appkit, I found some reference numbers in a type definition that enumerates the NSButtonType. I used those reference numbers in maxgui.h and gadget.bmx, and it seems to be working. Thanks for the help, -Garrett |