RunyuWindow.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * This file is part of Runyu.
  3. *
  4. * Runyu is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * Runyu is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with Runyu. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #ifndef _RUNYU_WINDOW_H
  18. #define _RUNYU_WINDOW_H
  19. #include <Window.h>
  20. #include <GroupLayout.h>
  21. #include <TextControl.h>
  22. static const uint32 kMessageSearch = 'srch';
  23. static const uint32 kMsgUpdateDictionary = 'updd';
  24. static const uint32 kMsgLearnNavi = 'lnvi';
  25. static const uint32 kMsgAboutRunyu = 'abtr';
  26. class RunyuWindow : public BWindow {
  27. public:
  28. RunyuWindow(BRect frame, const char* title);
  29. virtual ~RunyuWindow();
  30. virtual void MessageReceived(BMessage* message);
  31. virtual bool QuitRequested();
  32. private:
  33. void _InitWindow();
  34. void _SearchForWord(const char*);
  35. void _WriteDefinition(BString&, BString&, BString&);
  36. private:
  37. BGroupLayout* fLayout;
  38. BTextView* results;
  39. BTextControl* searchInput;
  40. };
  41. #endif // _RUNYU_WINDOW_H