Mac GUI

2021-08-27 Thread whiterock
Hey, nice work! Are there any plans on adding a canvas element of sorts? like something which is freely drawable - for instance when creating a photoshop like program or generative art or slideshow things etc

Mac GUI

2021-08-26 Thread Neodim
Hello, Just wonder if there is any progress with Outline View sub widget? Also regarding Table View: it would be awesome to have click/select call-backs as well as move/del of row/column functionality...

Mac GUI

2021-08-12 Thread AIR
I've merged the dev branch with master, so now a static lib gets created when using nimble. I've also uploaded a preliminary xib file converter to the `examples` folder. It doesn't do all of the objects this library has yet, but has a demo.xib file included so you can try it. Any input on the

Mac GUI

2021-08-08 Thread AIR
Thanks @georgelemon. All, I have switched the repository over to [GitHub](https://github.com/Airr/nim-cocoa.git), and have updated the original post. Of note: The `dev` branch is configured so that a static library is used in place of the discreet modules, which leads to faster compilation. A

Mac GUI

2021-08-07 Thread jdf
So excited about this. Is there any reason it couldn't be extended to iOS? Happy to contribute eventually (after substantial learning...!)

Mac GUI

2021-08-04 Thread georgelemon
Great library! I'm also interested playing with WKWebView, JSBridge and other Web/Webkit related APIs for wrapping advanced web apps with custom UIs <3

Mac GUI

2021-08-03 Thread AIR
I added `newEditMenu` and `newFormatMenu` procs to auto-generate Edit and Font menus. Uploaded `editor.nim` to showcase them. Remember to bundle the app so the menus are accessible. Edit menu has: * Undo * Redo * Cut * Copy * Paste * Select All Format menu has: * "Show Fonts"

Mac GUI

2021-08-03 Thread AIR
> BTW, shortkey commands like Cmd-S, Cmd-O, Cmd-N need to be set up separately? In general, yes, as part of creating the menuitems. I'm thinking of approaching this a bit differently, though. What would your thoughts be if I created a proc that would create the menu for you, along with the asso

Mac GUI

2021-08-03 Thread Neodim
AIR, thank you for you reply and for your efforts: I really believe that good GUI libs make our lovely Nim-lang more stronger and popular! Well, menu items behavior was not obvious but now it is fine. BTW, shortkey commands like Cmd-S, Cmd-O, Cmd-N need to be set up separately? Regarding NSTabl

Mac GUI

2021-08-02 Thread kcvinu
Hi, Thank you for your expressions of sympathy. Well, Coca is different from Win32 API. Your current implementation seems very good. It took lot of boilerplate code from a Nim user. Thanks for your effort.

Mac GUI

2021-08-01 Thread AIR
@kcvinu First, condolences to you and your family on the loss of your mom... Exposing events like you can with WinAPI is not a trivial task with the Cocoa runtime. It's been a while since I've done any WinAPI coding, but if I remember correctly you could grab all of the events being generated

Mac GUI

2021-08-01 Thread AIR
BTW, I forgot to mention: For ToolTips, just do: btn1.tooltip="Just Click Already!" Run

Mac GUI

2021-08-01 Thread AIR
@neodim * I updated the .text function, thanks for finding the bug! * Adding menu items works, I tested with the following (both under High Sierra [regression testing] and Big Sur): proc setupMenus() = var f = newMenu("File") newMenuItem(f, "New","n",nil)

Mac GUI

2021-08-01 Thread kcvinu
@AIR, Assume that I have a button. I want to add a click event handler and a mouse enter event handler for the same button. In my Windows GUI lib (Not completed though), every control has different events. And you can set like this. var win = newWindow() win.create() # Will

Mac GUI

2021-08-01 Thread Neodim
Started to make one app using this library and faced few points: * .text function was not working for Text Edit widget. I have fixed it by changing `textStorage` to `documentView` in functions.m file, lines 49,50 - please check; * adding menu items was not working with me (menu is ok) - plea

Mac GUI

2021-07-31 Thread AIR
@kcvinu, a question: What is is you are looking to use the mouse events to do? If it's for tooltips, Cocoa supports that I just haven't exposed it yet.

Mac GUI

2021-07-31 Thread AIR
Todays Update: I added preliminary support for Cocoa Bindings. Consider this code snippet (self below is an object containing the gui object handles): self.win = newWindow("Cocoa Bindings Demo 1", 462, 128, winStyle) self.chk = newCheckBox(self.win, "Enabled?", 18, 18, 78,

Mac GUI

2021-07-31 Thread AIR
> I meant how to connect a MouseEnter event handler or a MouseLeave event > handler along with a Click event. I see. This might be possible with what's called "Method Swizzling", where ObjC allows you to add/replace Class methods during runtime. I'll see what I can do, but might take a bit of

Mac GUI

2021-07-30 Thread kcvinu
I apologize for not writing clearly what I meant. I meant how to connect a MouseEnter event handler or a MouseLeave event handler along with a Click event. To be frank, how to connect two different event handlers to a single control (widget)

Mac GUI

2021-07-30 Thread AIR
> How do you connect a second event handler to a button ? AFAIK, this is not possible with macOS/Cocoa in terms of setting an on-click action

Mac GUI

2021-07-29 Thread Araq
> This module doesn't use a Box/Container paradigm, so laying out objects like > that doesn't translate from modules that do. > > On macOS, whether you use Storyboards or Xib files, the actual objects are > laid out by positional coordinates, and you 'anchor' them to sides of the > displayed pa

Mac GUI

2021-07-29 Thread kcvinu
Wonderful !! Now, one can easily create a mac gui with this library. The code is straight forward and neat. I wish Windows had a gui lib like this too. I know there are plenty of gui libs for Windows. But none of them are expressive like this. This is a a simple aproach. I have a question. How

Mac GUI

2021-07-29 Thread AIR
Bumped to v. 0.1.1 Added GroupBox, TabView, and RadioButton objects. Uploaded examples of each in action. Uploaded file detailing the functions available in NSFunctions module. This module doesn't use a Box/Container paradigm, so laying out objects like that doesn't translate from modules that

Mac GUI

2021-07-28 Thread Neodim
App Bundle works, thanks! By layout tools I mean tools for widgets aligning, adjusting margins, paddings, gaps, grouping them into boxes, frames and layers..I used to use it in GTK and just trying to get how it works in Cocoa... Also please advice how to use widget methods, for example how to ge

Mac GUI

2021-07-27 Thread AIR
> is it possible to make a kind of tree-view or expandable view widget? Maybe, I'll have to look into it > the app is starting with terminal window behind main window even with > --app:gui key - how to fix it? macOS uses Application Bundles for it's GUI applications. You'll need to create the

Mac GUI

2021-07-27 Thread Neodim
Just tried it and found it really perfect! 100% native GUI lib! Few questions: * is it possible to make a kind of tree-view or expandable view? * the app is starting with terminal window behind main window even with --app:gui key - how to fix it? * what are future plans about other midgets(

Mac GUI

2021-07-27 Thread enthus1ast
Any chance this could be added to nigui? :)

Mac GUI

2021-07-26 Thread mateli
"I really wish some one would just wrap Metal Graphics API." There are wrappers that allow OpenGL and Vulkan that are used for cross platform game programming. I know for sure that ImGui supports OS X so it should be viable for that use case. It is obviously not a "native" UI but I would persona

Mac GUI

2021-07-25 Thread AIR
Hi, treeform. Thanks for checking this out. On macOS, most apps don't quit when the window is closed. In this case, just do "COMMAND-Q" to exit as you would for most mac apps. In the case of the upper-case 'Thesaurus', on macOS the first letter of each word in the app filename is typically cap

Mac GUI

2021-07-25 Thread treeform
Wow really good. I just tried it. The examples worked great! Instead of wrapping actual ObjC with nim you wrap them first in .m files and call that API. I think thats a better model. Its a pain crating all these NSStrings, NSColor, etc... Some things I noticed: * git repo is name NimCocoa bu

Mac GUI

2021-07-25 Thread AIR
Hi, all. There's been some talk of a `native` macOS GUI implementation over the years, but I don't recall much coming from those discussions. Necessity being the mother of invention, I decided to give it a go. [NimCocoa](https://git.binarymagic.net/AIR/NimCocoa) is my attempt at implementing a