Hello Lucas,
Your feature request for dynamic workflow navigation is very
interesting! The next step of the workflow will be created dynamically based
on the results of the current step. For example, if the current step is
Marching Cubes and the output is a surface mesh, depending on the number of
components, next step can be a extract main surface or go directly to mesh
editing.
I'm sorry but this feature is currently not supported in GIMIAS. The
workflow manager stores a set of workflows that you can activate
dynamically. When a workflow is activated, the GUI will be updated depending
on the active workflow. These are the functions you need to call:
1. WorkflowManager::SetActiveWorkflow()
2. BaseMainWindow::AttachWorkflow(): This function executes the
following actions:
1. Main notebook and all its current tab pages are destroyed
2. New notebook and tab pages are created based on the
workflow using WorkflowGUIBuilder class.
3. The new notebook is added to the main frame
I've tested to attach a workflow dynamically when the user press a
button and it takes some time to destroy and create the new GUI. However, I
think that it will be easy to add a new function UpdateWorkflow() that can
update the GUI only with the modified components of the workflow. For
example, if the workflow has 2 steps and you add a new step, when calling
UpdateWorkflow, it will add a new tab page and will keep the previous tab
pages. Using this function will improve the performance.
This week we released GIMIAS-1.4.0-Release Candidate and we are
working on the stable version that will be released on September. Since this
feature is an extension of the Framework and will not modify the behavior of
the current functionalities, it could be included in the GIMIAS-1.4.1 stable
version.
Related to workflow navigation, why don't you use the Workflow
Navigation widget? We could add a feature that hides the "future" steps of
the workflow.
You can also test another way to create a new plugin tab page is
using plugin perspective. You can create a new plugin tab page using this
line of code:
Core::Runtime::Kernel::GetGraphicalInterface()->CreatePluginTab(
"New step!" );
If you prefer, we can discuss the details of this functionality
using my personal email. Could you please send me a brief description about
your project and what are you planning to achieve?
Thanks!
Xavi
-----Original Message-----
From: Lucas Klaus Beyer [mailto:[email protected]]
Sent: martes, 02 de agosto de 2011 16:02
To: gimias developers
Subject: [Gimias-developers] Creating and switching workflow steps on the
fly.
Hello,
I am trying to create a nonlinear workflow. In essence, the first step has 2
buttons and when the user clicks on one of them, he goes through "wf1", if
he clicks onto the other one, he goes through "wf2". In each workflow step,
I want to load a different custom working area. I already succeed to load
and display a custom working area.
1. I would like to show only the tabs for the steps the user has already
seen and the current one in the tab bar.
2. I want that the user can only go back one step at a time, destroying the
current step.
3. I want to programatically get the user to the next step when he clicks on
some button.
I have the feeling that it is easiest by creating a new step programatically
when the user clicks on some button and then switch to it. Unfortunately, I
don't seem to be doing it right:
Core::Workflow::Pointer pWorkflow =
Core::Runtime::Kernel::GetWorkflowManager()->GetActiveWorkflow();
Core::WorkflowStep::Pointer pNextStep = Core::WorkflowStep::New("Next
Step!");
pWorkflow->AddStep(pNextStep);
Core::Runtime::Kernel::GetGraphicalInterface()->GetMainWindow()->UpdateActiv
eWorkflowLayout();
does not seem to add tabs. Funny thing is that the tabs appear the next time
I open gimias. This raises one more point: when restarting gimias, the user
should only see the first tab (i.e. the workflow should not be saved). So,
how do I add steps dynamically? Is that even supported? Or do you have any
better idea?
As to switching to the next tab programatically, I came up with this, taken
from coreWorkflowNavigationWidget.cxx, which seems to work: (mainly
including it in this email for others which might search for it):
wxWindow* mainWindow =
Core::Runtime::Kernel::GetGraphicalInterface()->GetMainWindow();
wxAuiNotebook* tabContainer =
wxDynamicCast(mainWindow->FindWindow(wxID_TabContainer), wxAuiNotebook);
wxWindowUpdateLocker noUpdates(tabContainer);
if(tabContainer) {
tabContainer->AdvanceSelection();
}
Best regards,
Lucas
----------------------------------------------------------------------------
--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The
must-attend event for mobile developers. Connect with experts.
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Gimias-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gimias-developers
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts.
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Gimias-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gimias-developers