Laxkit
0.0.7.1
|
Public Member Functions | |
ShortcutTreeSelector (anXWindow *parnt, const char *nname, const char *ntitle, unsigned long nstyle, int xx, int yy, int ww, int hh, int brder, anXWindow *prev, unsigned long nowner=0, const char *mes=0, unsigned long long nmstyle=0, MenuInfo *minfo=NULL) | |
virtual void | Refresh () |
virtual void | SwapBuffers () |
virtual int | LBDown (int x, int y, unsigned int state, int count, const LaxMouse *d) |
virtual int | LBUp (int x, int y, unsigned int state, const LaxMouse *d) |
virtual int | MouseMove (int x, int y, unsigned int state, const LaxMouse *d) |
virtual int | CharInput (unsigned int ch, const char *buffer, int len, unsigned int state, const Laxkit::LaxKeyboard *d) |
virtual int | isPressableKey (unsigned int ch) |
virtual void | UpdateSearch (MenuInfo *m, const char *str, int search_type) |
Public Member Functions inherited from Laxkit::TreeSelector | |
TreeSelector (anXWindow *parnt, const char *nname, const char *ntitle, unsigned long nstyle, int xx, int yy, int ww, int hh, int brder, anXWindow *prev, unsigned long nowner=0, const char *mes=0, unsigned long long nmstyle=0, MenuInfo *minfo=NULL) | |
Constructor. | |
virtual | ~TreeSelector () |
Destructor, increment count on menu. | |
virtual int | init () |
Set some values that are derived from other values (pagesize, highlight, shadow, ...). | |
virtual int | RBDown (int x, int y, unsigned int state, int count, const LaxMouse *d) |
Right button and drag drags the screen around (with potential autoscrolling) | |
virtual int | RBUp (int x, int y, unsigned int state, const LaxMouse *d) |
Nothing but remove tag from buttondown. | |
virtual int | WheelUp (int x, int y, unsigned int state, int count, const LaxMouse *d) |
Scroll screen down. | |
virtual int | WheelDown (int x, int y, unsigned int state, int count, const LaxMouse *d) |
Scroll screen up. | |
virtual int | Idle (int tid) |
Autoscroll if necessary**** todo. | |
virtual int | MoveResize (int nx, int ny, int nw, int nh) |
Calls ScrolledWindow::MoveResize(nx,ny,nw,nh). | |
virtual int | Resize (int nw, int nh) |
Calls ScrolledWindow::Resize(nw,nh). | |
virtual int | FocusOn (const FocusChangeData *e) |
Focus on draws the char over item. | |
virtual int | FocusOff (const FocusChangeData *e) |
Focus off draws the char over item. | |
virtual int | movescreen (int dx, int dy) |
Try to move the screen by dx pixels and dy pixels. | |
virtual int | SetFirst (int which, int x, int y) |
Make visible item with index which be near window coordinate x,y. | |
virtual int | Curitem () |
Return curitem, which is the last item whose state was toggled. | |
virtual const MenuItem * | Item (int c) |
virtual MenuInfo * | Menu () |
virtual int | InstallMenu (MenuInfo *nmenu) |
virtual int | Expand (int which) |
Expand which visible item. If already expanded, then do nothing. | |
virtual int | Collapse (int which) |
virtual int | Select (int which) |
Programs call this to select index which of visible items. | |
virtual int | Deselect (int which) |
virtual int | RebuildCache () |
virtual MenuItem * | GetSelected (int i) |
Return the ith selelected item. i must be in range [0..NumSelected()-1]. | |
virtual int | NumSelected () |
Return how many items are currently selected. | |
virtual void | SetLineHeight (int ntotalheight, int newleading, char forcearrange) |
Set the new line height and leading. | |
virtual void | Sync () |
This is meant to be called when the window is going, but you just added or removed a bunch of stuff. | |
virtual void | Sort (int t, int detail) |
Sort the items alphabetically by the name. | |
virtual int | AddItems (const char **i, int n, int startid) |
Add a bunch of items all at once. | |
virtual int | AddItem (const char *i, LaxImage *img, int nid, int newstate) |
Add item with text i to the top index of menuitems. | |
virtual int | AddColumn (const char *i, LaxImage *img, int width) |
Add a new column for details of items. | |
virtual void | ClearColumns () |
virtual void | RemapColumns () |
Public Member Functions inherited from Laxkit::ScrolledWindow | |
ScrolledWindow (anXWindow *parnt, const char *nname, const char *ntitle, unsigned long nstyle, int xx, int yy, int ww, int hh, int brder, anXWindow *prev, unsigned long nowner=0, const char *nsend=NULL, PanController *pan=NULL) | |
virtual int | send () |
Send what? huh?***. | |
virtual int | UseThisWindow (anXWindow *nwindow) |
Use nwindow as the nested window. | |
virtual int | Event (const EventData *e, const char *mes) |
Public Member Functions inherited from Laxkit::PanUser | |
PanUser (PanController *npan=NULL) | |
Create with a new panner. | |
virtual | ~PanUser () |
Removes this from panner tellstack. Delete panner if necessary. | |
virtual PanController * | createNewPanner (PanController *pan=NULL) |
Create a new panner that is a copy of pan if given. | |
virtual void | UseThisPanner (PanController *npanner) |
Replace the current panner with npanner, which can be NULL to mean make a new one. | |
Public Member Functions inherited from Laxkit::anXWindow | |
anXWindow (anXWindow *parnt, const char *nname, const char *ntitle, unsigned long nstyle, int xx, int yy, int ww, int hh, int brder, anXWindow *prev, unsigned long nowner, const char *nsend) | |
Constructor. | |
virtual | ~anXWindow () |
anXWindow destructor. Its X window should have been XDestroy'd before here. | |
virtual const char * | whattype () |
virtual const char * | WindowTitle (int which=0) |
Return basically the name of the window. | |
virtual void | WindowTitle (const char *newtitle) |
Change the title of the window. This text would usually be displayed in the bar provided by a window manager. | |
virtual const char * | tooltip (int mouseid=0) |
By default, return win_tooltip. | |
virtual const char * | tooltip (const char *newtooltip) |
Replace the current tooltip, return the current tooltip (after replacing). | |
virtual anXWindow * | findChildWindowByTitle (const char *title) |
Find the first immediate child window that has win_title==title. | |
virtual anXWindow * | findChildWindowByName (const char *name) |
Find the first immediate child window that has win_name==name. | |
virtual int | Grayed () |
Return whether this window is grayed. | |
virtual int | Grayed (int g) |
Set the gray state of this window. Returns Grayed(void). | |
virtual int | preinit () |
virtual int | close () |
Called by anXApp from anXApp::destroywindow() when a window is to be destroyed. | |
virtual Displayer * | MakeCurrent () |
virtual int | Needtodraw () |
Default is to return needtodraw. | |
virtual void | Needtodraw (int nntd) |
If 0, then the window does not need refreshing. Otherwise it does. | |
virtual int | deletenow () |
Return whether the window is allowed to be deleted. | |
virtual int | setWinStyle (unsigned int stylebit, int newvalue) |
Control various window related basic styling of win_style. | |
virtual int | getWinStyle (unsigned int stylebit) |
Currently, simply return win_style&stylebit. | |
virtual void | installColors (WindowColors *newcolors) |
Dec_count old and inc_count new. | |
virtual ShortcutHandler * | GetShortcuts () |
Return a ShortcutHandler that contains stacks of bound shortcuts and possible window actions. | |
virtual int | PerformAction (int action_number) |
virtual int | ExposeChange (ScreenEventData *e) |
Default behavior on Expose events is to call Needtodraw(1). | |
virtual int | DeviceChange (const DeviceEventData *e) |
virtual int | KeyUp (unsigned int ch, unsigned int state, const LaxKeyboard *kb) |
Called when a key is released. | |
virtual int | ButtonDown (int button, int x, int y, unsigned int state, int count, const LaxMouse *m) |
virtual int | ButtonUp (int button, int x, int y, unsigned int state, const LaxMouse *m) |
virtual int | MBDown (int x, int y, unsigned int state, int count, const LaxMouse *d) |
Default is just to return 1. | |
virtual int | MBUp (int x, int y, unsigned int state, const LaxMouse *d) |
Default is just to return 1. | |
virtual void | contentChanged () |
Windows may call this when their contents change. | |
virtual void | selectionChanged () |
Windows may call this when their selections change. | |
virtual anXWindow * | GetController () |
Return the window most relevant for tab control loops. | |
virtual int | SelectNextControl (const LaxDevice *d) |
Transfer focus to nextcontrol. | |
virtual int | SelectPrevControl (const LaxDevice *d) |
Transfer the focus to prevcontrol. | |
virtual void | ControlActivation (int on) |
Do special activation or not when controls are activated by tabbing. | |
virtual int | AddPrevControl (anXWindow *prev) |
virtual int | AddNextControl (anXWindow *next) |
virtual int | ConnectControl (anXWindow *towhat, int after=1) |
Connect towhat to this. Used for tab loops. | |
virtual int | CloseControlLoop () |
Close a tab loop. | |
virtual void | SetOwner (anXWindow *nowner, const char *mes=NULL, unsigned int send_mask=0) |
Set the new owner and control message. | |
virtual void | SetOwner (unsigned long nowner_id, const char *mes=NULL, unsigned int send_mask=0) |
virtual void | dump_out (FILE *f, int indent, int what, anObject *context) |
Simple dumping function. | |
virtual LaxFiles::Attribute * | dump_out_atts (LaxFiles::Attribute *att, int what, anObject *context) |
virtual void | dump_in_atts (LaxFiles::Attribute *att, int flag, anObject *context) |
Public Member Functions inherited from Laxkit::Tagged | |
virtual int | HasTag (const char *tag, int casematters) |
Return whether the tag exists. | |
virtual int | NumberOfTags () |
Return the number of tags, strangely enough. | |
virtual const char * | GetTag (int i) |
Return const pointer to the tag text for tag number i, where i==0 is the first tag. | |
virtual char * | GetAllTags () |
Return a new char[] with a space separated list of all the tags. | |
virtual int | InsertTags (const char *tags, int casematters) |
Insert tags from a string such as 'tag1 tag2 tag3 "tag with spaces" tag4'. | |
virtual int | InsertTag (const char *tag, int casematters) |
Insert tag if it doesn't exist already. | |
virtual int | RemoveTag (const char *tag) |
The tag must be an exact match. | |
virtual int | RemoveTag (int i) |
Remove tag number i. i must be in range [0..NumberOfTags()-1]. | |
virtual void | FlushTags () |
Public Member Functions inherited from LaxFiles::DumpUtility | |
virtual void | dump_in (FILE *f, int indent, int what, Laxkit::anObject *loadcontext, Attribute **att) |
Read in a file segment as an Attribute, and pass parsing duties to dump_in_atts. | |
virtual | ~DumpUtility () |
Empty virtual destructor. | |
Public Member Functions inherited from Laxkit::aDrawable | |
aDrawable (Drawable d=0) | |
virtual int | DrawableType () |
virtual int | ValidDrawable () |
Public Attributes | |
MenuItem * | wait_for |
int | skipswap |
Public Attributes inherited from Laxkit::TreeSelector | |
PtrStack< ColumnInfo > | columns |
int | sort_detail |
int | sort_descending |
int | gap |
unsigned long | highlight |
Highlight color of beveled graphics. | |
unsigned long | shadow |
Shadow color of beveled graphics. | |
unsigned long long | menustyle |
int | padg |
The pad to place between text and other graphic elements. | |
int | pad |
The pad around the inside border of the window. | |
int | leading |
The height of lines are leading+(text height). | |
int | iwidth |
The width of the sub menu indicator graphic of a menu item. (only one width, not per item) | |
Public Attributes inherited from Laxkit::ScrolledWindow | |
IntRectangle | inrect |
The rectangle that thewindow resides in. | |
IntRectangle | outrect |
The rectangle that holds all of thewindow and scrollers. | |
int | scrollwidth |
PanPopup * | panpopup |
anXWindow * | thewindow |
Scroller * | xscroller |
Scroller * | yscroller |
Public Attributes inherited from Laxkit::PanUser | |
PanController * | panner |
Public Attributes inherited from Laxkit::anXWindow | |
WindowColors * | win_colors |
anXApp * | app |
char * | win_name |
An arbitrary string to be used as an id. | |
char * | win_title |
The title of the window. | |
anXWindow * | win_parent |
int | win_screen |
unsigned long | win_style |
int | win_x |
int | win_y |
int | win_w |
int | win_h |
unsigned int | win_border |
int | win_pointer_shape |
Identifier for a stock mouse shape. | |
char | win_on |
Nonzero if the window is mapped. | |
char | win_active |
Should be positive when the window has a keyboard focus, 0 otherwise. | |
unsigned long | win_owner |
Who gets control messages from this window. | |
unsigned int | win_owner_send_mask |
char * | win_sendthis |
The type of message that gets sent to owner. | |
anXWindow * | nextcontrol |
anXWindow * | prevcontrol |
Public Attributes inherited from Laxkit::Tagged | |
int | sorttags |
Additional Inherited Members | |
Protected Member Functions inherited from Laxkit::TreeSelector | |
virtual void | adjustinrect () |
Remove the pads from inrect. | |
virtual void | findoutrect () |
Set outrect to be the window minus space for title. | |
virtual double | getitemextent (MenuItem *mitem, double *w, double *h, double *gx, double *tx) |
Find extent of text+graphic+(pad between graphic and text). | |
virtual double | getgraphicextent (MenuItem *mitem, double *w, double *h) |
virtual void | drawitem (MenuItem *mitem, IntRectangle *itemspot) |
Draw the item in the provided area.. | |
virtual void | drawitem (int c) |
Draw the item with the index value c. | |
virtual void | drawsep (const char *name, IntRectangle *rect) |
Draw a separator (default is just a win_colors->grayedfg colored line) across rect widthwise. | |
virtual void | drawSubIndicator (MenuItem *mitem, int x, int y, int selected) |
Draws a submenu indicator centered on x,y, and width=iwidth, height=textheight+leading. | |
virtual void | drawitemname (MenuItem *mitem, IntRectangle *rect) |
Draw the item icon and name in rect, AND all detail items within rect. | |
virtual void | drawtitle () |
Draw the menu title if present. Default is print it out at top of window (not inrect). | |
virtual int | findmaxwidth (int s, int e, int *h_ret) |
Find the maximum width of (text+ padg+ graphic subw) of items in range [s,e]. | |
virtual int | findColumnWidth (int which) |
virtual int | send (int deviceid) |
Send message to owner. | |
virtual void | addselect (int i, unsigned int state) |
This is called on a mouse down or a space press. | |
virtual int | findItem (int x, int y, int *onsub, int *column) |
Find the index of the item at window coordinates (x,y). | |
virtual int | findRect (int c, IntRectangle *itemspot) |
Find screen rectangle item c goes in. | |
virtual void | arrangeItems () |
Basically RebuildCache(), then update the panner. | |
virtual void | syncWindows (int useinrect=0) |
Called same for ScrolledWindow, then arrangeItems. | |
virtual int | makeinwindow () |
Make sure that ccuritem is visible by shifting screen so it is. | |
virtual int | numItems () |
Default is to return the number of items in menu->menuitems stack. | |
virtual MenuItem * | item (int i, char skipcache=0) |
Return the item corresponding to screen index i. | |
virtual int | addToCache (int indent, MenuInfo *menu, int cury) |
Add items to visibleitems stack. Called from RebuildCache. | |
virtual int | DrawItems (int indent, MenuInfo *item, int &n, flatpoint offset) |
virtual void | drawItemContents (MenuItem *i, int offsetx, int offsety, int fill=1) |
virtual void | drawarrow (int x, int y, int r, int type) |
Draw the arrows for menus, really just THING_Triangle_Up, Down, Left, Right for submenus. | |
virtual void | editInPlace (int which) |
Set up the edit in place mode. | |
Protected Attributes inherited from Laxkit::TreeSelector | |
ButtonDownInfo | buttondown |
int | mousedragmode |
Flag for whether the mouse has been dragged since a button was down. | |
MenuInfo * | menu |
Stores the actual menu items. | |
int | offsetx |
int | offsety |
int | firstinw |
int | textheight |
The height of lines are leading+(text height). | |
int | lineheight |
int | pagesize |
3/4 of inrect.height. | |
int | timerid |
MenuItem * | curmenuitem |
The MenuItem corresponding to curitem. | |
int | curitem |
The last selected or deselected item. | |
int | ccuritem |
The item which one has cursored to. | |
PtrStack< MenuItem > | selection |
char * | searchfilter |
int | showsearch |
int | needtobuildcache |
MenuInfo | visibleitems |
Redefine to capture key input...
-1 for Escape or other chars that are supposed to break out of key waiting. shift, control, alt, or windows/meta key return 0. return 1 for key ok.
|
virtual |
Call TreeSelector::Refresh(), then if we are waiting for a key, overwrite that cell to prompt for input.
Reimplemented from Laxkit::TreeSelector.
References SwapBuffers(), Laxkit::textout(), and Laxkit::anXWindow::win_on.
|
virtual |
Hack to overlay something during a Refresh.
Reimplemented from Laxkit::anXWindow.
Referenced by Refresh().
|
virtual |
Recursively do the heavy lifting of updating the menu to search for str. Uses search_type for the search type.
If setinput!=0, then update the search input box.
References Laxkit::PtrStack< T >::e, Laxkit::MenuItem::GetSubmenu(), Laxkit::TreeSelector::menu, Laxkit::MenuInfo::menuitems, and Laxkit::PtrStack< T >::n.
Referenced by Laxkit::ShortcutWindow::UpdateSearch().