L
Logan Capaldo
Hello all, I got a few questions and ideas I want to throw out there.
First thing I want to talk about is layout in Tk, Gtk and WxWidgets.
Ideally I'd like to use Gtk, because a) its the toolkit I'm most
familiar with, and b) I like its api the best. This is mitigated
by the fact that I've moved from Linux to OS X, and I'd like to be
cross-platform without being "weird" (ie, I don't want people to have
install an X server unless its on an OS without an alternative
"native" GUI interface, in which case they already have one
probably). This brought me to Tk, but the layout choices I find kind
of weird. I REALLY liked Gtk's HBox and VBox, setup, and while Tk has
many options including a grid layout, (which I could use like HBox
and Vbox sort of) this does not (appear) to be one of them. This made
me look at WxWidgets, which does have that style of layout but I find
the api to be really ugly, personally (although Tk isn't exactly
"pretty"). Last time I looked at Fox, it had the same "ugly" API
issue, although I haven't looked at it recently, and both Tk and
WxWidgets have the native look thing going for them. So anyone have
any alternate suggestions?
The reason I am in such a widget conudrum is that after building a
personal app in rails, it started to make me think about MVC more,
and rails whole framework setup. This made me wonder if the same
"rails" style methods could be applied to desktop apps. I was also
inspired by the CSS/HTML/Javascript setup. This led me to the project
I am currently working on, which would be a RAD framework for Ruby.
Original I was going to have the interface layouts in .xml but then I
thought, hey I can do this as a DSL. (One syntax to rule them all).
Currently I have code that lets stuff like this work
% cat a.rb
window :id => 'main_win', :title => "Hello World" do
label :caption => "Hello, world!"
end
or even
% cat b.rb
window :title => "Hello" do
hbox do
label :caption => "Hello, world"
button :caption => "Ok", :action => :some_action
end
end
I feel like hbox and vbox style layouts would be more simpler for the
user than having to do things like
grid do
row do
widget
aram => value
end
end
Although it would not be hard to provide that functionality as well
as hboxes and vboxes. I guess this boils down to is there a Tk
equivalent to HBox and VBox?
And, would anyone use this? I personally think its quite cool.
First thing I want to talk about is layout in Tk, Gtk and WxWidgets.
Ideally I'd like to use Gtk, because a) its the toolkit I'm most
familiar with, and b) I like its api the best. This is mitigated
by the fact that I've moved from Linux to OS X, and I'd like to be
cross-platform without being "weird" (ie, I don't want people to have
install an X server unless its on an OS without an alternative
"native" GUI interface, in which case they already have one
probably). This brought me to Tk, but the layout choices I find kind
of weird. I REALLY liked Gtk's HBox and VBox, setup, and while Tk has
many options including a grid layout, (which I could use like HBox
and Vbox sort of) this does not (appear) to be one of them. This made
me look at WxWidgets, which does have that style of layout but I find
the api to be really ugly, personally (although Tk isn't exactly
"pretty"). Last time I looked at Fox, it had the same "ugly" API
issue, although I haven't looked at it recently, and both Tk and
WxWidgets have the native look thing going for them. So anyone have
any alternate suggestions?
The reason I am in such a widget conudrum is that after building a
personal app in rails, it started to make me think about MVC more,
and rails whole framework setup. This made me wonder if the same
"rails" style methods could be applied to desktop apps. I was also
inspired by the CSS/HTML/Javascript setup. This led me to the project
I am currently working on, which would be a RAD framework for Ruby.
Original I was going to have the interface layouts in .xml but then I
thought, hey I can do this as a DSL. (One syntax to rule them all).
Currently I have code that lets stuff like this work
% cat a.rb
window :id => 'main_win', :title => "Hello World" do
label :caption => "Hello, world!"
end
or even
% cat b.rb
window :title => "Hello" do
hbox do
label :caption => "Hello, world"
button :caption => "Ok", :action => :some_action
end
end
I feel like hbox and vbox style layouts would be more simpler for the
user than having to do things like
grid do
row do
widget
end
end
Although it would not be hard to provide that functionality as well
as hboxes and vboxes. I guess this boils down to is there a Tk
equivalent to HBox and VBox?
And, would anyone use this? I personally think its quite cool.