Custom Silverlight TreeView Template - templates

I build tree with Hierarchical datatemplate (with button beside each node) loaded from xml file.
What I want to do is when i press the button beside the node it will open node details in a popup inside the tree (Like tree sub node)
Any ideas ????
I'm using Silverlight 4

Determine if you want type of layout control you want to use (Canvas, Grid, Stackpanel).
Each has their strengths and weaknesses.
Once you decide on this, start designing the logic... then you start coding.
If you're too lazy and want a control/solution that's alreayd built for you, you can try googling it... which i'm pretty sure you'll find samples/demos/source-code for.
Personally i do recommend you spend time looking for samples and source-code, because a hierarchical treeview is a bit more complex than you might think. In particular, the logic for your node placements so that they never collide with each other could be complex (depending on your level of experience).
If you DO decide to write your own, I applaud you, and you will surely learn way more this way.
Oh by the way, not sure what you mean by hierarchical datatemplate. I suggest you write a usercontrol for a single Node. then maybe write another control (treeview control) that manages all the nodes to present the hierarchy tree.

Related

Game pad Menu Navigation Programmatically

I've searched the web using all the search terms that my mind could come up with but all to no avail. I guess it's mainly because I can't explain my question with a couple of keywords. Anyway, here is my question:
You know how in games that use consoles you can navigate through the menu using the game pad buttons? And when you press right, it automatically selects the nearest control on the right of the current control. Likewise with up and down. And when you press a certain control and another list of menu unfolds on top the original control, and you are limited to select one of the new controls and can't select the other older controls even though they still appear on the screen? Well, how is that created programmatically? I'd love it if you can provide obj-c code of an implementation but any language would be fine. If not possible, then a pseudo code would also work fine with me. Even plain text would work with me but I wouldn't recommend it since I'm not a native speaker and may have issues understanding...
Basically, here is my question in bullet points in case I wasn't clear above due to my weak English:
1- How to move through a menu using a game pad.
2- Once a drop down list is selected, how to lock the contrils that can be selected to the controls that unfold from the drop down list.
And that's pretty much all of it. Thanks a lot for the help!
Make a collection of buttons
For each button, make each dpad direction optionally map to a new button
Make each button selection optionally map to a new collection
Done
Hard-coding is one way to map one piece of data to another. Or a file that describes it. Or static data. Or calculated algorithmically.

Is ubigraph capable of node selection and custom context sensitive click menus?

I want to write custom callbacks and context menus for selecting individual nodes (vertices) in ubigraph. The way I see it, the user interfacing with the server will almost always want to be able to find out more about a particular vertex, and there is a definite need to be able to do things like see if there is a path between two nodes.
Does anybody know if this can be done? I don't think it can, since the ubigraph server is closed source. Anybody with some in depth knowledge is more than welcome to provide an answer.
Here is ubigraph: http://ubietylab.net/

Node graph editor layout algorithm

I'm very much trying to do what was asked here:
http://www.qtcentre.org/threads/45028-Designing-a-Node-Editor-(Hint-Blender-Node-Editor)
Which is basically a blender style node editor using Qt. Creating rects with circles which can be drag/dropped is fairly simple to figure out (see the image below).
The issue I have is how the algorithm for connecting the circles between nodes would work. Also I don't know how this could be drawn efficiently using QGraphicsItem API's? I have seen QPainter::cubicTo() which looks like it may be the way to go?
I assume it somehow manages to find a none overlapping path? But it must also handle the case where it has to overlap?
And what about the user being able to move these lines around in case the algorithm has done a bad job? I don't think this would be simple to implement using QPainter::cubicTo() as you could only move the curves control points?
I don't think you'll get anyone posting the code for doing the whole lot here.
Well, I volunteer -- just in case someone still needs such a library.
It is a Qt-based node editor implemented on top of QGraphicsView.
A library consumer defines data models, the rest is done by the node editor.
Some features:
Model-view approach.
Models describe data types, number of input and outputs and optional embedded QWidget.
The Scene could be saved to file.
The rest similar projects were either not finished, not supported anymore or lacking some features.
https://github.com/paceholder/nodeeditor
I would suggest that you implement it without taking into consideration overlap but with the possibility of overriding how the connecting line is drawn.
It looks like there were some good replies on the Qt forum. I don't think you'll get anyone posting the code for doing the whole lot here.
Perhaps take a look at the Qt demos Graphics View/Elastic Nodes - There is code for the demo that you can use as a starting point, but it is a lot of work to get from there to something like the Blender node editor.
Another node editor to take a look at is SynthEdit or Synth Maker (has a nice one).

Xerces-C++ DOM node line/column number location

I'm writing a custom XML validator using Xerces-C++. My current approach loads the document into a DOM, and then checks are performed on it. What I need is a way to access the line/column number of a node in the DOM. I've been reading the API docs and googling, but I'm coming up short. Is it possible to somehow retrieve this kind of information about the nodes?
Implementing the XMLValidator interface looks like it would probably provide me with that kind of info, but it would require completely rewriting the intended validation architecture. Frankly, an XMLValidator approach seems ugly and monolithic. I have a different and much simpler validation system in mind (one that is also easily parallelizable) and everything works; all I need is the line/column number info of the nodes. The Qt DOM implementation that I've used before (and which I can't use now) provides this information up front, so I can't see why Xerces is making things difficult.
A possible solution can be found here.

Tabbed VS Tree for navigaion. Which is the preferred approach?

I realize that in of TOAD books right, it justifies the reaons on why it uses tabbed pane is that tree view involves too much scrolling.
But for me i like tree view better. As it only shows you the top level.
I see TOAD user interface. i thought the tabbed panels was very confusing for me to switch around.
What are your opinions regarding this?
I think in general if you are designing the interface, I think it depends on the number of items you are trying to display.
in your TOAD example. (which i am assuming is Toad from www.quest.com) the tabs only serve to remove 1 level (the top level) from your tree.
The advantage the tree structure has is that you can 'drill down' from scheme to table to trigger, etc..
so it really depends on what you are trying to achieve, or the style you want to work with.