Need guidelines for developing GUI builder tool using ruby-gtk2 - ruby

I am in process of developing custom GUI generator tool (its new GUI tool like glade) and to achieve that i am using ruby-gtk2. I am a newbie to the world of ruby and gtk, so i need a help in a problem which i am struck regarding adding background image to a widget.
Let me explain in detail, the application (i.e.,GTK::window) has two sections say left section and right section (section can be frames,layouts,panned window or equivalent). Left section has a list of all widgets like Button, Label, CheckBox and so on as images. So user who needs to design the GUI will drag and drop any widgets from left section to right sections, on dropping to right section it (i.e., widget) should be re-sizable and also draggable across right section.
Currently i am adding all widgets to eventbox so that on drag n drop on right section i will get all the controls of events like drag_start, drag_motion, drag_end etc..But how can i add an image as background to eventbox, so that i have button image added to eventbox and also handle resize and drag. Concept is user should be able to resize the properties of widget that drops to right section. Need help in implementing this, i know i am missing something to achieve this. Awaiting any suggestions.

Related

In Flutter, how to create an UI like Uber to have map in middle and AppBar and navigate to different type of views

I am pretty new to Flutter. I am working on a project to create an UI like Uber to have google map in the background and have different type of views, such as full screen address input view(it seems full screen but part of the view can be hidden to expose the map behind and interact with it), persistent bottom sheets and some floating button on top. Using stack to put one bottom sheet on the map is not difficult. But when it comes to navigate back and forth between different type of views while keeping the map in the background and the map is still touchable, I am not sure how to manage it. Sometimes it navigate 2-3 times deep and back to the first bottom sheet. So the question is:
How to implement a way to navigate between different type of views, like firstly pull up full screen address view, pop the address view after entering address and pull up car type view as the sample image shown on the link below. And press on the back button on top left corner will go back to address view.
If you have any idea how to design this navigation flow, please share it. Thank you.
Sample image
Update: found this GitHub repository demonstrating how to implement Uber like UI. I am checking it out.
https://github.com/iamSahdeep/fu_uber
For background maps with elements on top, a Stack is best as you mentioned.
For persistent bottom sheets, use the BottomSheet class
For the floating button, use the FloatingActionButton class
For the navigation between BottomSheets only, you might want to learn more about this plugin Modal Bottom Sheet. It has exactly what you need. Check the "Cupertino Modal with inside Navigation".

Origami fold effect for UIView and NavigationController Bar

I need to implement the functionality that this library provides: XYOrigami. The main issue, is I must implement it to fold on the center view when the left view is revealed rather fold the side views. Unfortunately, this has become quite a task (and I'm currently looking at manipulating the library below to do so). The left tray should be just a tray with a width of 100 to 200. When it comes out, the center view should have a cringle origami effect and fold until the tray is hidden again. Is anyone aware of a library that does this or a way to accomplish this effect.
I think you will get the sample code in mpospese / EnterTheMatrix
repository.
Just have a look at the second last tab,"The Fold Animation" & then click view.
I think this view can be taken as the center view for your case & XYOrigami as the side menu.
You many need to tweak the EnterTheMatrix to fold-unfold horizontally unlikely as it fold-unfold vertically by default.
I hope you can make a new custom component hybridized from the above two Custom controls.
Happy Coding.
Hope that Helps.

How can I group OS X toggle buttons in Interface Builder

On iTunes, the view buttons are grouped together as such:
I would like to achieve this effect in my OS X app. I can't find instructions or a tutorial for this. I suspect my problem is that I don't know what terminology to use in my search.
I have an NSToolBar. I can add a single button, but I don't know how to group multiple buttons and made them dependent on each other's toggle state.
Can you point me in the right direction?
That's a Segmented Control. (NSSegmentedControl)
Just drag it from the object library into the toolbar, and then you can configure every cell individually.

What Qt4 widgets should I use and how to approximate a ribbon-style interface?

I am trying to create an interface for my application using Qt Designer. I want it to have a tabbed, ribbon-style set of controls at the top, and a MDI-style area with docked windows which I plan to show and hide depending on which tab of the ribbon is currently selected. I am just beginning with Qt Designer as well as Qt4 itself for that matter so I'm not quite sure how to setup the window, which widgets and layouts should I use etc.
It's quite obvious there should be a QTabWidget at the top, but I'm not sure about the bottom. Should I use a QFrame? A QMdiArea? A dock widget? What layouts can I use to make sure the tab widget has a fixed height, occupies the whole width of the window at all times and the bottom area scales as the window is resized?
I've read in the manual that splitter layouts allow for manual adjustment of the size of the widgets they contain, but I can't drag the box size of a widget after I place them inside a splitter. Thus I'm unable to setup the area below the ribbon. Anyone, help?
You should look into the QMainWindow and check the multiple utilities it can provide you (Toolbar, StatusBar, DockWidgets, CentralWidget, etc...).
The way I understood your case is that you will always have the MDI Area visible, and that the tab bar will only be used to change the dockWidgets. Here's how I would do it.
The centralWidget of the mainWindow would be a QWidget with a QVBoxLayout containing a QTabBar widget first (up) and a QMdiArea under it. The sizes should be handled automatically.
This will allow the user (or you) to dock widgets on the left, bottom, top or right areas of the mainWindow's central widget. Keep pointers to the dockWidgets to be able to move and show/hide them at will.
Hope this helps.
VTK Designer, which is built on Qt, has a Ribbon-ish interface. You might take a look at the source code for reference.

qt - creator - how to maximize the widget screen

I am tryimng to make a UI. But in qt, the window size is too short, I want to work in a separate windows like photoshop. Here I am posting the picture. I want to see the middle window(i rounded it by rose color) in full screen size. Can anybody help me?
EDIT:
If I want to create a full screen application, How can I position the widgets in it. It's possible dragging a widget inside a scroll bared window,but is not user friendly. I want it to work like photoshop, like separate windows.
If you want to have more space to work on the design of your widgets, you can open QtDesigner separately and maximize the design area. Panels can be closed and undocked.
Now if you want to maximized only the central widget, there is a trick:
Create a custom widget and work on it in QtDesigner. You will be able to put it in near full screen by increasing its size
Set your custom widget as central widget in your GUI application.
Previous answer before edit:
Hi, If you want to view your widget in fullsreen mode, you can call the ShowFullScreen function. If what you want is to maximize the widget, you can call the ShowMaximized function.

Resources