FileSelButtonTip.diff

Zbigniew Rebacz, 09/28/2020 08:51 PM

Download (1.15 KB)

View differences:

CtrlLib/CtrlUtil.cpp (kopia robocza)
382 382
{
383 383
	button.NoWantFocus();
384 384
	button.SetImage(CtrlImg::right_arrow());
385
	button <<= THISBACK(OnAction);
385
	button << [=] { OnAction(); };
386 386
}
387 387

  
388 388
void FileSelButton::OnAction()
CtrlLib/CtrlUtil.h (kopia robocza)
501 501
class FileSelButton : public FileSel
502 502
{
503 503
public:
504
	typedef FileSelButton CLASSNAME;
505 504
	enum MODE { MODE_OPEN, MODE_SAVE, MODE_DIR };
506 505
	FileSelButton(MODE mode = MODE_OPEN, const char *title = NULL);
507

  
506
	
508 507
	void               Attach(Ctrl& parent) { parent.AddFrame(button); }
509 508
	void               Detach();
510 509
	void               Title(String t)      { title = t; }
511 510
	String             GetTitle() const     { return title; }
512 511
	
513 512
	Event<>            WhenSelected;
514

  
513
	
514
	FileSelButton&     Tip(const char *txt) { button.Tip(txt); return *this; }
515
	
515 516
private:
516 517
	void               OnAction();
517 518