diff options
Diffstat (limited to 'lib/wx/src/gen/wxTreeCtrl.erl')
-rw-r--r-- | lib/wx/src/gen/wxTreeCtrl.erl | 56 |
1 files changed, 34 insertions, 22 deletions
diff --git a/lib/wx/src/gen/wxTreeCtrl.erl b/lib/wx/src/gen/wxTreeCtrl.erl index dfa9e691ce..df2b9bed39 100644 --- a/lib/wx/src/gen/wxTreeCtrl.erl +++ b/lib/wx/src/gen/wxTreeCtrl.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2012. All Rights Reserved. +%% Copyright Ericsson AB 2008-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -35,21 +35,22 @@ -include("wxe.hrl"). -export([addRoot/2,addRoot/3,appendItem/3,appendItem/4,assignImageList/2,assignStateImageList/2, collapse/2,collapseAndReset/2,create/2,create/3,delete/2,deleteAllItems/1, - deleteChildren/2,destroy/1,editLabel/2,ensureVisible/2,expand/2,getBoundingRect/3, - getBoundingRect/4,getChildrenCount/2,getChildrenCount/3,getCount/1, + deleteChildren/2,destroy/1,editLabel/2,ensureVisible/2,expand/2,getBoundingRect/2, + getBoundingRect/3,getChildrenCount/2,getChildrenCount/3,getCount/1, getEditControl/1,getFirstChild/2,getFirstVisibleItem/1,getImageList/1, getIndent/1,getItemBackgroundColour/2,getItemData/2,getItemFont/2, getItemImage/2,getItemImage/3,getItemParent/2,getItemText/2,getItemTextColour/2, getLastChild/2,getNextChild/3,getNextSibling/2,getNextVisible/2,getPrevSibling/2, getPrevVisible/2,getRootItem/1,getSelection/1,getSelections/1,getStateImageList/1, hitTest/2,insertItem/4,insertItem/5,isBold/2,isExpanded/2,isSelected/2, - isVisible/2,itemHasChildren/2,new/0,new/1,new/2,prependItem/3,prependItem/4, - scrollTo/2,selectItem/2,selectItem/3,setImageList/2,setIndent/2,setItemBackgroundColour/3, - setItemBold/2,setItemBold/3,setItemData/3,setItemDropHighlight/2, - setItemDropHighlight/3,setItemFont/3,setItemHasChildren/2,setItemHasChildren/3, - setItemImage/3,setItemImage/4,setItemText/3,setItemTextColour/3,setStateImageList/2, - setWindowStyle/2,sortChildren/2,toggle/2,toggleItemSelection/2,unselect/1, - unselectAll/1,unselectItem/2]). + isTreeItemIdOk/1,isVisible/2,itemHasChildren/2,new/0,new/1,new/2,prependItem/3, + prependItem/4,scrollTo/2,selectItem/2,selectItem/3,setImageList/2, + setIndent/2,setItemBackgroundColour/3,setItemBold/2,setItemBold/3, + setItemData/3,setItemDropHighlight/2,setItemDropHighlight/3,setItemFont/3, + setItemHasChildren/2,setItemHasChildren/3,setItemImage/3,setItemImage/4, + setItemText/3,setItemTextColour/3,setStateImageList/2,setWindowStyle/2, + sortChildren/2,toggle/2,toggleItemSelection/2,unselect/1,unselectAll/1, + unselectItem/2]). %% inherited exports -export([cacheBestSize/2,captureMouse/1,center/1,center/2,centerOnParent/1, @@ -303,26 +304,28 @@ expand(#wx_ref{type=ThisT,ref=ThisRef},Item) wxe_util:cast(?wxTreeCtrl_Expand, <<ThisRef:32/?UI,0:32,Item:64/?UI>>). -%% @equiv getBoundingRect(This,Item,Rect, []) --spec getBoundingRect(This, Item, Rect) -> boolean() when - This::wxTreeCtrl(), Item::integer(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}. +%% @equiv getBoundingRect(This,Item, []) +-spec getBoundingRect(This, Item) -> Result when + Result ::{Res ::boolean(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}}, + This::wxTreeCtrl(), Item::integer(). -getBoundingRect(This,Item,Rect={RectX,RectY,RectW,RectH}) - when is_record(This, wx_ref),is_integer(Item),is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) -> - getBoundingRect(This,Item,Rect, []). +getBoundingRect(This,Item) + when is_record(This, wx_ref),is_integer(Item) -> + getBoundingRect(This,Item, []). %% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlgetboundingrect">external documentation</a>. --spec getBoundingRect(This, Item, Rect, [Option]) -> boolean() when - This::wxTreeCtrl(), Item::integer(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, +-spec getBoundingRect(This, Item, [Option]) -> Result when + Result :: {Res ::boolean(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}}, + This::wxTreeCtrl(), Item::integer(), Option :: {textOnly, boolean()}. -getBoundingRect(#wx_ref{type=ThisT,ref=ThisRef},Item,{RectX,RectY,RectW,RectH}, Options) - when is_integer(Item),is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH),is_list(Options) -> +getBoundingRect(#wx_ref{type=ThisT,ref=ThisRef},Item, Options) + when is_integer(Item),is_list(Options) -> ?CLASS(ThisT,wxTreeCtrl), MOpts = fun({textOnly, TextOnly}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(TextOnly)):32/?UI>>|Acc]; (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), wxe_util:call(?wxTreeCtrl_GetBoundingRect, - <<ThisRef:32/?UI,0:32,Item:64/?UI,RectX:32/?UI,RectY:32/?UI,RectW:32/?UI,RectH:32/?UI, BinOpt/binary>>). + <<ThisRef:32/?UI,0:32,Item:64/?UI, BinOpt/binary>>). %% @equiv getChildrenCount(This,Item, []) -spec getChildrenCount(This, Item) -> integer() when @@ -561,7 +564,8 @@ getStateImageList(#wx_ref{type=ThisT,ref=ThisRef}) -> <<ThisRef:32/?UI>>). %% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlhittest">external documentation</a>. --spec hitTest(This, Point) -> integer() when +-spec hitTest(This, Point) -> Result when + Result ::{Res ::integer(), Flags::integer()}, This::wxTreeCtrl(), Point::{X::integer(), Y::integer()}. hitTest(#wx_ref{type=ThisT,ref=ThisRef},{PointX,PointY}) when is_integer(PointX),is_integer(PointY) -> @@ -640,6 +644,14 @@ itemHasChildren(#wx_ref{type=ThisT,ref=ThisRef},Item) wxe_util:call(?wxTreeCtrl_ItemHasChildren, <<ThisRef:32/?UI,0:32,Item:64/?UI>>). +%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtreectrl.html#wxtreectrlistreeitemidok">external documentation</a>. +-spec isTreeItemIdOk(Id) -> boolean() when + Id::integer(). +isTreeItemIdOk(Id) + when is_integer(Id) -> + wxe_util:call(?wxTreeCtrl_IsTreeItemIdOk, + <<Id:64/?UI>>). + %% @equiv prependItem(This,Parent,Text, []) -spec prependItem(This, Parent, Text) -> integer() when This::wxTreeCtrl(), Parent::integer(), Text::unicode:chardata(). |