g4tools  5.4.0
Classes | Typedefs | Functions
tools::WinTk Namespace Reference

Classes

class  CallbackData
 
class  Component
 
class  OpenGLArea
 
class  Shell
 

Typedefs

typedef void(* Callback) (Component &, CallbackData &, void *)
 
typedef void(* SetFocusCallback) (Shell *, void *)
 

Functions

bool GetClassName (HWND aWindow, std::string &a_value)
 
HWND GetChildByClassName (HWND aWindow, const std::string &aClassName)
 
void SetGeometry (HWND aWindow, int aX, int aY, unsigned int aWidth, unsigned int aHeight)
 
void GetSize (HWND aWindow, int &aWidth, int &aHeight)
 
unsigned int GetNumberOfChildren (HWND aWindow)
 
HWND GetLastChild (HWND aWindow)
 
void GetText (HWND aWindow, std::string &a_value)
 
bool IsStyle (HWND aWindow, LONG aStyle)
 
void ChangeStyle (HWND aWindow, LONG aStyle, bool aValue)
 
bool IsShell (HWND aWindow)
 
HWND GetShell (HWND aWindow)
 
bool Show (HWND aWindow)
 
bool Hide (HWND aWindow)
 
bool IsTabStop (HWND aWindow)
 
HWND GetTabStopInTree (HWND aWindow, bool aForward)
 
HWND GetTabStopInSibling (HWND aWindow, bool aForward)
 
HWND GetTabStop (HWND aDialog, HWND aWindow, bool aForward=true)
 
HBITMAP CreateDIB (HDC aDC, int aWidth, int aHeight, int aBPP, void **aBits)
 
bool TreeGetItemLabel (HWND aWindow, HTREEITEM aItem, std::string &a_value)
 
bool TreeIsItemBranch (HWND aWindow, HTREEITEM aItem)
 
bool TreeIsItemExpanded (HWND aWindow, HTREEITEM aItem)
 
void TreeGetItemPath (HWND aWindow, HTREEITEM aItem, std::string &a_value)
 
void TreeGetItemXML (HWND aWindow, HTREEITEM aItem, std::string &a_value)
 
int smanip_axtoi (const std::string &a_string)
 
HBITMAP ConvertXpmToDIB (HDC aDC, const std::vector< std::string > &aXPM, int &aWidth, int &aHeight)
 
HBITMAP Read_Xpm (HDC aDC, const std::string &aFileName, int &aWidth, int &aHeight)
 
std::string TreeGetItemLabel (HWND aWindow, HTREEITEM aItem)
 
std::string TreeGetItemPath (HWND aWindow, HTREEITEM aItem)
 
std::string TreeGetItemXML (HWND aWindow, HTREEITEM aItem)
 
std::string GetText (HWND aWindow)
 
std::string GetClassName (HWND aWindow)
 
HBITMAP ReadXpm (HDC aDC, const std::string &aFileName, int &aWidth, int &aHeight)
 

Typedef Documentation

◆ Callback

typedef void(* tools::WinTk::Callback) (Component &, CallbackData &, void *)

Definition at line 33 of file WinTk.

◆ SetFocusCallback

typedef void(* tools::WinTk::SetFocusCallback) (Shell *, void *)

Definition at line 349 of file WinTk.

Function Documentation

◆ ChangeStyle()

void tools::WinTk::ChangeStyle ( HWND  aWindow,
LONG  aStyle,
bool  aValue 
)
inline

Definition at line 110 of file tools.

110  {
111  LONG_PTR style = ::GetWindowLongPtr(aWindow,GWL_STYLE);
112  if(aValue) { //Enable style.
113  style = style | aStyle;
114  } else { //Disbale style.
115  style = style & ~aStyle;
116  }
117  ::SetWindowLongPtr(aWindow,GWL_STYLE,style);
118 }

◆ ConvertXpmToDIB()

HBITMAP tools::WinTk::ConvertXpmToDIB ( HDC  aDC,
const std::vector< std::string > &  aXPM,
int &  aWidth,
int &  aHeight 
)
inline

Definition at line 338 of file tools.

338  {
339  // Convert from xpm to DIB (demands hex colors).
340  // From CoinWin/widgets/SoWinBitmapButton.cpp.
341  aWidth = 0;
342  aHeight = 0;
343  if(!aXPM.size()) return 0;
344 
345  std::vector<int> vals;
346  tools::values<int>(aXPM[0]," ",false,vals);
347  if(vals.size()!=4) return 0;
348  int width = vals[0];
349  int height = vals[1];
350  int numcol = vals[2];
351  int numchars = vals[3];
352  if(width<=0) return 0;
353  if(height<=0) return 0;
354  if(numcol<=0) return 0;
355  if(numchars<=0) return 0;
356 
357  // Check consistency :
358  if((height+numcol)!=aXPM.size()-1) return 0;
359 
360  size_t lcolor = 0;
361  int i;
362  for (i = 0; i < numcol; i++) {
363  std::string::size_type pos = aXPM[i+1].rfind("c #");
364  if(pos==std::string::npos) continue; // May be "c None"
365  lcolor = aXPM[i+1].size()-(pos+3);
366  break;
367  }
368  //printf("debug : xpm : numcol %d (%d)\n",numcol,lcolor);
369 
370  if( (lcolor!=6) && (lcolor!=12) ) return 0;
371 
372  // create color lookup table
373  char* charlookuptable = new char[numcol * numchars];
374  //long* colorlookuptable = new long[numcol];
375  int* rlookuptable = new int[numcol];
376  int* glookuptable = new int[numcol];
377  int* blookuptable = new int[numcol];
378 
379  bool done = true;
380  // get colors
381  for (i = 0; i < numcol; i++) {
382 
383  const std::string& line = aXPM[i+1];
384 
385  // Check consistency :
386  if((int)line.size()<numchars) {
387  done = false;
388  break;
389  }
390 
391  for (int j = 0; j < numchars; j ++) {
392  charlookuptable[(i * numchars) + j] = line[j];
393  }
394 
395  // Find color by value :
396  std::string::size_type pos = line.find("c #",numchars);
397  if(pos!=std::string::npos) {
398  size_t lc = line.size()-(pos+3);
399  if(lc!=lcolor) {
400  done = false;
401  //printf("debug : xpm : error in \"%s\" %d %d\n",
402  //line.c_str(),lc,lcolor);
403  break;
404  }
405  if(lcolor==6) {
406  rlookuptable[i] = smanip_axtoi(line.substr(pos+3+0,2));
407  glookuptable[i] = smanip_axtoi(line.substr(pos+3+2,2));
408  blookuptable[i] = smanip_axtoi(line.substr(pos+3+4,2));
409  } else { //lcolor 12
410  rlookuptable[i] = smanip_axtoi(line.substr(pos+3+0,2));
411  glookuptable[i] = smanip_axtoi(line.substr(pos+3+4,2));
412  blookuptable[i] = smanip_axtoi(line.substr(pos+3+8,2));
413  }
414 
415  //printf("debug : xpm : color %d : (%x,%x,%x)\n",
416  // i,rlookuptable[i],glookuptable[i],blookuptable[i]);
417 
418  } else { // Could be "c None"
419  rlookuptable[i] = -1;
420  glookuptable[i] = -1;
421  blookuptable[i] = -1;
422  }
423  }
424 
425  //printf("debug : xpm : read color %d\n",done);
426 
427  //WARNING : pixelsize 3 does not work with button in a toolbar.
428  // unsigned char pixelsize = 3;
429  unsigned char pixelsize = 4;
430 
431  if(!done) pixelsize = 0; // Will induce a clean exit.
432 
433  // create bitmap
434  void* dest;
435  HBITMAP hbmp = CreateDIB(aDC,width,height,pixelsize * 8,&dest);
436 
437  if(hbmp) {
438  int noneColor = ::GetSysColor(COLOR_3DFACE);
439  done = true;
440  // put pixels
441  for (i = 0; i < height; i++) {
442 
443  const std::string& line = aXPM[i + 1 + numcol];
444 
445  // Check consistency :
446  if((int)line.size()!=(numchars*width)) {
447  done = false;
448  break;
449  }
450 
451  int y = i * width * pixelsize;
452 
453  for (int j = 0; j < width; j++) {
454 
455  int x = j * pixelsize;
456 
457  // for every color
458  for (int k = 0; k < numcol; k++) {
459 
460  bool found = true;
461  for (int l = 0; l < numchars; l++) {
462  if (charlookuptable[(k * numchars) + l]
463  != line[(j * numchars) + l]) {
464  found = false;
465  break;
466  }
467  }
468 
469  if(found) {
470 
471  unsigned char r,g,b;
472  if (rlookuptable[k] == -1) {
473  r = (noneColor & 0x00FF0000)>>16;
474  g = (noneColor & 0x0000FF00)>>8;
475  b = noneColor & 0x000000FF;
476  } else {
477  r = rlookuptable[k];
478  g = glookuptable[k];
479  b = blookuptable[k];
480  }
481 
482  if(pixelsize==4) {
483  ((unsigned char*)dest)[y + x + 0] = b;
484  ((unsigned char*)dest)[y + x + 1] = g;
485  ((unsigned char*)dest)[y + x + 2] = r;
486  ((unsigned char*)dest)[y + x + 3] = 0;
487  } else {
488  ((unsigned char*)dest)[y + x + 0] = b;
489  ((unsigned char*)dest)[y + x + 1] = g;
490  ((unsigned char*)dest)[y + x + 2] = r;
491  }
492 
493  // next pixel
494  break;
495 
496  }
497 
498  }
499 
500  }
501 
502  }
503  if(!done) {
504  //printf("debug : xpm : can'tread pixels.\n");
505  ::DeleteObject(hbmp);
506  hbmp = 0;
507  }
508  }
509 
510  // cleanup
511  delete [] charlookuptable;
512  delete [] rlookuptable;
513  delete [] glookuptable;
514  delete [] blookuptable;
515 
516  if(hbmp) {
517  aWidth = width;
518  aHeight = height;
519  }
520 
521  return hbmp;
522 }

◆ CreateDIB()

HBITMAP tools::WinTk::CreateDIB ( HDC  aDC,
int  aWidth,
int  aHeight,
int  aBPP,
void **  aBits 
)
inline

Definition at line 200 of file tools.

200  {
201  if((aBPP!=24) && (aBPP!=32)) return 0;
202 
203  BITMAPINFO format;
204  BITMAPINFOHEADER* header = (BITMAPINFOHEADER*)&format;
205  header->biSize = sizeof(BITMAPINFOHEADER);
206  header->biWidth = aWidth;
207  header->biHeight = -aHeight;
208  header->biPlanes = 1;
209  header->biBitCount = aBPP;
210  header->biCompression = BI_RGB;
211  header->biSizeImage = 0;
212  header->biXPelsPerMeter = 0;
213  header->biYPelsPerMeter = 0;
214  header->biClrUsed = 0;
215  header->biClrImportant = 0;
216 
217  UINT flag = DIB_RGB_COLORS;
218  HBITMAP bitmap = ::CreateDIBSection(aDC,&format,flag,(void**)aBits,NULL,0);
219 
220  if(!(*aBits)) return 0;
221 
222  return bitmap;
223 }

◆ GetChildByClassName()

HWND tools::WinTk::GetChildByClassName ( HWND  aWindow,
const std::string &  aClassName 
)
inline

Definition at line 27 of file tools.

27  {
28  // A CBS_SIMPLE has two children of class ComboLBox and Edit.
29  // At creation, a CBS_DROPDOWN has one child of class Edit.
30  if(!aWindow) return NULL;
31  HWND child = GetFirstChild(aWindow);
32  std::string ss;
33  while(child) {
34  GetClassName(child,ss);
35  if(ss==aClassName) return child;
36  child = GetNextSibling(child);
37  }
38  return NULL;
39 }

◆ GetClassName() [1/2]

std::string tools::WinTk::GetClassName ( HWND  aWindow)
inline

Definition at line 579 of file tools.

579  {
580  std::string ss;
581  GetClassName(aWindow,ss);
582  return ss;
583 }

◆ GetClassName() [2/2]

bool tools::WinTk::GetClassName ( HWND  aWindow,
std::string &  a_value 
)
inline

Definition at line 19 of file tools.

19  {
20  if(!aWindow) {a_value.clear();return false;}
21  char className[256];
22  ::GetClassName(aWindow,className,128);
23  a_value = std::string(className);
24  return true;
25 }

◆ GetLastChild()

HWND tools::WinTk::GetLastChild ( HWND  aWindow)
inline

Definition at line 71 of file tools.

71  {
72  HWND child = GetFirstChild(aWindow);
73  while(child) {
74  HWND next = GetNextSibling(child);
75  if(!next) return child;
76  child = next;
77  }
78  return 0;
79 }

◆ GetNumberOfChildren()

unsigned int tools::WinTk::GetNumberOfChildren ( HWND  aWindow)
inline

Definition at line 61 of file tools.

61  {
62  unsigned int number = 0;
63  HWND child = GetFirstChild(aWindow);
64  while(child) {
65  number++;
66  child = GetNextSibling(child);
67  }
68  return number;
69 }

◆ GetShell()

HWND tools::WinTk::GetShell ( HWND  aWindow)
inline

Definition at line 129 of file tools.

129  {
130  HWND window = aWindow;
131  if(IsShell(window)) return window;
132  while(true) {
133  HWND parent = GetParent(window);
134  if(!parent) return window;
135  if(IsShell(parent)) return parent;
136  window = parent;
137  }
138  return 0;
139 }

◆ GetSize()

void tools::WinTk::GetSize ( HWND  aWindow,
int &  aWidth,
int &  aHeight 
)
inline

Definition at line 54 of file tools.

54  {
55  RECT rect;
56  ::GetWindowRect(aWindow,&rect);
57  aWidth = rect.right-rect.left;
58  aHeight = rect.bottom-rect.top;
59 }

◆ GetTabStop()

HWND tools::WinTk::GetTabStop ( HWND  aDialog,
HWND  aWindow,
bool  aForward = true 
)
inline

Definition at line 189 of file tools.

189  {
190  if(!aWindow) return NULL;
191  HWND window = aWindow;
192  while(window && (window!=aDialog) ) {
193  HWND tabStop = GetTabStopInSibling(window,aForward);
194  if(tabStop) return tabStop;
195  window = GetParent(window);
196  }
197  return GetTabStopInTree(aDialog,aForward);
198 }

◆ GetTabStopInSibling()

HWND tools::WinTk::GetTabStopInSibling ( HWND  aWindow,
bool  aForward 
)
inline

Definition at line 178 of file tools.

178  {
179  if(!aWindow) return NULL;
180  HWND child = aForward ? GetNextSibling(aWindow) : GetPrevSibling(aWindow);
181  while(child) {
182  HWND tabStop = GetTabStopInTree(child,aForward);
183  if(tabStop) return tabStop;
184  child = aForward ? GetNextSibling(child) : GetPrevSibling(child);
185  }
186  return NULL;
187 }

◆ GetTabStopInTree()

HWND tools::WinTk::GetTabStopInTree ( HWND  aWindow,
bool  aForward 
)
inline

Definition at line 167 of file tools.

167  {
168  if(IsTabStop(aWindow)) return aWindow;
169  HWND child = aForward ? GetFirstChild(aWindow) : GetLastChild(aWindow);
170  while(child) {
171  HWND tabStop = GetTabStopInTree(child,aForward);
172  if(tabStop) return tabStop;
173  child = aForward ? GetNextSibling(child) : GetPrevSibling(child);
174  }
175  return NULL;
176 }

◆ GetText() [1/2]

std::string tools::WinTk::GetText ( HWND  aWindow)
inline

Definition at line 573 of file tools.

573  {
574  std::string ss;
575  GetText(aWindow,ss);
576  return ss;
577 }

◆ GetText() [2/2]

void tools::WinTk::GetText ( HWND  aWindow,
std::string &  a_value 
)
inline

Definition at line 81 of file tools.

81  {
82  int l = ::GetWindowTextLength(aWindow);
83  a_value.resize(l);
84  ::GetWindowText(aWindow,(char*)a_value.c_str(),l+1);
85 }

◆ Hide()

bool tools::WinTk::Hide ( HWND  aWindow)
inline

Definition at line 151 of file tools.

151  {
152  HWND shell = GetShell(aWindow);
153  if(!shell) return false;
154  ::ShowWindow(shell,SW_HIDE);
155  return true;
156 }

◆ IsShell()

bool tools::WinTk::IsShell ( HWND  aWindow)
inline

Definition at line 120 of file tools.

120  {
121  if(IsStyle(aWindow,WS_OVERLAPPEDWINDOW)) return true;
122  if(IsStyle(aWindow,WS_POPUP)) return true;
123  return false;
124 }

◆ IsStyle()

bool tools::WinTk::IsStyle ( HWND  aWindow,
LONG  aStyle 
)
inline

Definition at line 105 of file tools.

105  {
106  LONG_PTR style = ::GetWindowLongPtr(aWindow,GWL_STYLE);
107  return ( ((style & aStyle ) == aStyle) ? true : false);
108 }

◆ IsTabStop()

bool tools::WinTk::IsTabStop ( HWND  aWindow)
inline

Definition at line 162 of file tools.

162  {
163  LONG_PTR style = ::GetWindowLongPtr(aWindow,GWL_STYLE);
164  return ((style & WS_TABSTOP ) == WS_TABSTOP ? true : false);
165 }

◆ Read_Xpm()

HBITMAP tools::WinTk::Read_Xpm ( HDC  aDC,
const std::string &  aFileName,
int &  aWidth,
int &  aHeight 
)
inline

Definition at line 531 of file tools.

531  {
532  aWidth = 0;
533  aHeight = 0;
534  std::vector<std::string> text;
535  //std::string name;
536  //tools::file_name(aFileName,name);
537  if(!tools::file::read(aFileName,text)) return 0;
538 
539  std::vector<std::string> xpm;
540 
541  {for(size_t index=0;index<text.size();index++) {
542  if(text[index][0]!='"') continue;
543  std::string::size_type l = text[index].size();
544  std::string line = text[index].substr(1,l-1);
545  std::string::size_type pos = line.find("\"");
546  if(pos==std::string::npos) return 0;
547  xpm.push_back(line.substr(0,pos));
548  }}
549 
550  if(!xpm.size()) return 0;
551 
552  return ConvertXpmToDIB(aDC,xpm,aWidth,aHeight);
553 }

◆ ReadXpm()

HBITMAP tools::WinTk::ReadXpm ( HDC  aDC,
const std::string &  aFileName,
int &  aWidth,
int &  aHeight 
)
inline

Definition at line 592 of file tools.

592  {
593  std::string name;
594  tools::file_name(aFileName,name);
595  return Read_Xpm(aDC,name,aWidth,aHeight);
596 }

◆ SetGeometry()

void tools::WinTk::SetGeometry ( HWND  aWindow,
int  aX,
int  aY,
unsigned int  aWidth,
unsigned int  aHeight 
)
inline

Definition at line 41 of file tools.

41  {
42  if(!aWindow) return;
43  std::string className;
44  GetClassName(aWindow,className);
45  if(className=="ComboBox") {
46  // For a Combo the height is the visible part + the height of the list !
47  // (A combo may have no edit control).
48  ::MoveWindow(aWindow,aX,aY,aWidth,200,TRUE);
49  } else {
50  ::MoveWindow(aWindow,aX,aY,aWidth,aHeight,TRUE);
51  }
52 }

◆ Show()

bool tools::WinTk::Show ( HWND  aWindow)
inline

Definition at line 141 of file tools.

141  {
142  HWND shell = GetShell(aWindow);
143  if(!shell) return false;
144  ::SetForegroundWindow(shell);
145  ::ShowWindow(shell,SW_SHOWDEFAULT);
146  ::UpdateWindow(shell);
147  ::DrawMenuBar(shell);
148  return true;
149 }

◆ smanip_axtoi()

int tools::WinTk::smanip_axtoi ( const std::string &  a_string)
inline

Definition at line 308 of file tools.

308  {
309  // convert from ASCII hex to int
310  // Exa : "FF" -> 256.
311  int x = 0;
312  size_t n = a_string.size();
313  // convert n nibbles
314  for (size_t i = 0; i < n; i++) {
315  char c = a_string[i];
316  // numbers 0 - 9
317  if ((c > 0x2F) && (c < 0x3A))
318  x += ((c - 0x30) << ((n - i - 1) * 4));
319 
320  // capital letters A - F
321  if ((c > 0x40) && (c < 0x47))
322  x += ((c - 0x41 + 0x0A) << ((n - i - 1) * 4));
323 
324  // lower case letters a - f
325  if ((c > 0x60) && (c < 0x67))
326  x += ((c - 0x61 + 0x0A) << ((n - i - 1) * 4));
327  }
328  return x;
329 }

◆ TreeGetItemLabel() [1/2]

std::string tools::WinTk::TreeGetItemLabel ( HWND  aWindow,
HTREEITEM  aItem 
)
inline

Definition at line 555 of file tools.

555  {
556  std::string ss;
557  TreeGetItemLabel(aWindow,aItem,ss);
558  return ss;
559 }

◆ TreeGetItemLabel() [2/2]

bool tools::WinTk::TreeGetItemLabel ( HWND  aWindow,
HTREEITEM  aItem,
std::string &  a_value 
)
inline

Definition at line 235 of file tools.

235  {
236  TCHAR text[256];
237  TV_ITEM item;
238  item.hItem = aItem;
239  item.mask = TVIF_TEXT;
240  item.pszText = text;
241  item.cchTextMax = 256;
242  if(!TreeView_GetItem(aWindow,&item)) {a_value.clear();return false;}
243  a_value = std::string(text);
244  return true;
245 }

◆ TreeGetItemPath() [1/2]

std::string tools::WinTk::TreeGetItemPath ( HWND  aWindow,
HTREEITEM  aItem 
)
inline

Definition at line 561 of file tools.

561  {
562  std::string ss;
563  TreeGetItemPath(aWindow,aItem,ss);
564  return ss;
565 }

◆ TreeGetItemPath() [2/2]

void tools::WinTk::TreeGetItemPath ( HWND  aWindow,
HTREEITEM  aItem,
std::string &  a_value 
)
inline

Definition at line 263 of file tools.

263  {
264  HTREEITEM item = aItem;
265  a_value.clear();
266  std::string ss;
267  while(item && (item!=TVI_ROOT)) {
268  TreeGetItemLabel(aWindow,item,ss);
269  std::string opath = a_value;
270  a_value = "\n";
271  a_value += ss;
272  a_value += opath;
273  item = TreeView_GetParent(aWindow,item);
274  }
275  // Remove the leading \n
276  if(a_value.size()) a_value = a_value.substr(1,a_value.size()-1);
277 }

◆ TreeGetItemXML() [1/2]

std::string tools::WinTk::TreeGetItemXML ( HWND  aWindow,
HTREEITEM  aItem 
)
inline

Definition at line 567 of file tools.

567  {
568  std::string ss;
569  TreeGetItemXML(aWindow,aItem,ss);
570  return ss;
571 }

◆ TreeGetItemXML() [2/2]

void tools::WinTk::TreeGetItemXML ( HWND  aWindow,
HTREEITEM  aItem,
std::string &  a_value 
)
inline

Definition at line 279 of file tools.

279  {
280  //return a XML string representing this tree
281  std::string spaceItem = "";
282  std::string spaceRoot = "";
283  std::string ss;
284  a_value.clear();
285  do {
286  a_value += spaceRoot + "<treeItem>";
287  a_value += spaceItem + "<label>";
288  TreeGetItemLabel(aWindow,aItem,ss);
289  a_value.append(ss);
290  a_value += "</label>";
291  a_value += spaceItem + "<opened>";
292  if (TreeIsItemExpanded(aWindow,aItem)) a_value.append("true");
293  else a_value.append("false");
294  a_value += "</opened>";
295  if (TreeView_GetChild(aWindow,aItem)) {
296  TreeGetItemXML(aWindow,TreeView_GetChild(aWindow,aItem),ss);
297  a_value += ss;
298  }
299  a_value += spaceRoot + "</treeItem>";
300  aItem = TreeView_GetNextSibling(aWindow,aItem);
301  }
302  while (aItem);
303 }

◆ TreeIsItemBranch()

bool tools::WinTk::TreeIsItemBranch ( HWND  aWindow,
HTREEITEM  aItem 
)
inline

Definition at line 247 of file tools.

247  {
248  TV_ITEM item;
249  item.hItem = aItem;
250  item.mask = TVIF_CHILDREN;
251  if(!TreeView_GetItem(aWindow,&item)) return 0;
252  return item.cChildren?true:false;
253 }

◆ TreeIsItemExpanded()

bool tools::WinTk::TreeIsItemExpanded ( HWND  aWindow,
HTREEITEM  aItem 
)
inline

Definition at line 255 of file tools.

255  {
256  TV_ITEM item;
257  item.hItem = aItem;
258  item.mask = TVIS_EXPANDED;
259  if(!TreeView_GetItem(aWindow,&item)) return 0;
260  return ((item.state & TVIS_EXPANDED)== TVIS_EXPANDED) ? true : false;
261 }
tools::WinTk::GetLastChild
HWND GetLastChild(HWND aWindow)
Definition: tools:71
tools::WinTk::Read_Xpm
HBITMAP Read_Xpm(HDC aDC, const std::string &aFileName, int &aWidth, int &aHeight)
Definition: tools:531
tools::WinTk::TreeIsItemExpanded
bool TreeIsItemExpanded(HWND aWindow, HTREEITEM aItem)
Definition: tools:255
tools::WinTk::GetText
std::string GetText(HWND aWindow)
Definition: tools:573
tools::WinTk::CreateDIB
HBITMAP CreateDIB(HDC aDC, int aWidth, int aHeight, int aBPP, void **aBits)
Definition: tools:200
tools::WinTk::GetShell
HWND GetShell(HWND aWindow)
Definition: tools:129
tools::WinTk::GetTabStopInTree
HWND GetTabStopInTree(HWND aWindow, bool aForward)
Definition: tools:167
tools::WinTk::IsStyle
bool IsStyle(HWND aWindow, LONG aStyle)
Definition: tools:105
tools::WinTk::TreeGetItemPath
std::string TreeGetItemPath(HWND aWindow, HTREEITEM aItem)
Definition: tools:561
tools::WinTk::IsShell
bool IsShell(HWND aWindow)
Definition: tools:120
tools::WinTk::TreeGetItemXML
std::string TreeGetItemXML(HWND aWindow, HTREEITEM aItem)
Definition: tools:567
tools::WinTk::TreeGetItemLabel
std::string TreeGetItemLabel(HWND aWindow, HTREEITEM aItem)
Definition: tools:555
tools::file::read
bool read(FILE *a_FILE, std::vector< std::string > &a_text)
Definition: file:89
tools::file_name
bool file_name(const std::string &a_path, std::string &a_name)
Definition: file_name:61
tools::WinTk::ConvertXpmToDIB
HBITMAP ConvertXpmToDIB(HDC aDC, const std::vector< std::string > &aXPM, int &aWidth, int &aHeight)
Definition: tools:338
tools::WinTk::GetTabStopInSibling
HWND GetTabStopInSibling(HWND aWindow, bool aForward)
Definition: tools:178
tools::WinTk::IsTabStop
bool IsTabStop(HWND aWindow)
Definition: tools:162
tools::file::found
bool found(const std::string &a_file, const std::string &a_what, std::vector< std::string > &a_found)
Definition: file:507
tools::WinTk::GetClassName
std::string GetClassName(HWND aWindow)
Definition: tools:579
tools::WinTk::smanip_axtoi
int smanip_axtoi(const std::string &a_string)
Definition: tools:308