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
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...
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
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
So excited about this. Is there any reason it couldn't be extended to iOS?
Happy to contribute eventually (after substantial learning...!)
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
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"
> 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
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
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.
@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
BTW, I forgot to mention:
For ToolTips, just do:
btn1.tooltip="Just Click Already!"
Run
@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)
@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
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
@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.
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,
> 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
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)
> 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
> 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
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
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
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
> 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
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(
Any chance this could be added to nigui? :)
"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
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
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
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
31 matches
Mail list logo