FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TreeViewListener

 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
keinfarbton



Joined: 03 Dec 2005
Posts: 224
Location: Stuttgart - Germany

PostPosted: Wed Mar 29, 2006 3:22 pm    Post subject: TreeViewListener Reply with quote

I have a TreeView showing a list with ListStore. The selection mode is SINGLE. With selection of an item, i want to update another TextView with a description. But it turns out, the rowActivatedCallback is called by pressing enter, space or double-click only.

Is there a way to get a notification for the single-click or arrow movement of the selection?
Back to top
View user's profile Send private message
Ant



Joined: 06 Mar 2004
Posts: 306
Location: Canada

PostPosted: Wed Mar 29, 2006 7:44 pm    Post subject: Re: TreeViewListener Reply with quote

tionex wrote:
I have a TreeView showing a list with ListStore. The selection mode is SINGLE. With selection of an item, i want to update another TextView with a description. But it turns out, the rowActivatedCallback is called by pressing enter, space or double-click only.

Is there a way to get a notification for the single-click or arrow movement of the selection?

rowActivatedCallback is the only signal implemented on DUI for the TreeView (*).
(you could imlpement other signals for your own use).

I use lower level mouse actions on leds:
Code:

bit mouseButtonReleaseCallback(Widget widget, EventButton eventButton)
{
   TreeIter iter = getSelectedIter();
   if ( iter !is null )
   {
      if ( eventButton.button() == 3 )
      {
         // do stuff
      }
   }
   return true;
}



Duit already implements all signals, for instance:
Code:

...
treeView.addOnMoveCursor(&moveCursorCallBack);
...
/+ return type will change to bool +/
int moveCursorCallBack(GtkMovementStep step, int direction, TreeView treeView)
{
   // do stuff
   return false;
}


Ant

(*) Duit implements all signals for all widgets as a list of delegates to be executed when each signal is raised - no listener interfaces tough.
(it's a bit soon to move to Duit yet)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> gtkD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group