Project

General

Profile

Download (1.91 KB) Statistics
| Branch: | Tag: | Revision:

aqfinance / src / fox / lib / dialogs / ff_selectbankacc.hpp @ 200398b3

1
/****************************************************************************
2
 * This file is part of the project AqFinance.
3
 * AqFinance (c) by 2009 Martin Preuss, all rights reserved.
4
 *
5
 * The license for this file can be found in the file COPYING which you
6
 * should have received along with this file.
7
 ****************************************************************************/
8

    
9
#ifndef FF_SELECTBANKACC_HPP
10
#define FF_SELECTBANKACC_HPP
11

    
12

    
13
#include <aqfinance/engine/lib/book/ae_bankaccount.h>
14

    
15

    
16
#include <fx.h>
17

    
18
#include <list>
19

    
20

    
21

    
22
class FF_App;
23
class FOX16_HtmlLabel;
24
class FF_BankAccountTree;
25

    
26

    
27

    
28
class FF_SelectBankAccount: public FXDialogBox {
29
  FXDECLARE(FF_SelectBankAccount)
30
public:
31

    
32
  enum {
33
    ID_ACCOUNT_LIST=FXDialogBox::ID_LAST,
34
    ID_BUTTON_CREATE,
35
    ID_LAST
36
  };
37

    
38
  FF_SelectBankAccount(FF_App* a,
39
                       FXWindow *parent,
40
                       const FXString& title,
41
                       FXuint opts=DECOR_TITLE|DECOR_BORDER,
42
                       FXint x=0, FXint y=0, FXint w=0, FXint h=0,
43
                       FXint pl=0, FXint pr=0, FXint pt=0, FXint pb=0,
44
                       FXint hs=0, FXint vs=0);
45
  ~FF_SelectBankAccount();
46

    
47
  static bool selectAccount(FF_App* app,
48
                            FXWindow *parent,
49
                            const FXString &title,
50
                            const AE_BANKACCOUNT *ba,
51
                            AQDB_ID &id);
52

    
53
  void init();
54
  void fini();
55

    
56
  FXint checkGui(FXbool quiet);
57
  FXint toGui(const AE_BANKACCOUNT *ba, AQDB_ID id);
58
  FXint fromGui(AQDB_ID &id);
59

    
60
  void create();
61

    
62
  long onCmdAccept(FXObject*, FXSelector, void *ptr);
63
  long onCmdCancel(FXObject*, FXSelector, void *ptr);
64

    
65
  long onCmdCreate(FXObject*, FXSelector, void *ptr);
66

    
67
protected:
68
  FF_SelectBankAccount();
69

    
70
  FF_App *m_app;
71

    
72
  FOX16_HtmlLabel *m_label;
73
  FXButton *m_okButton;
74

    
75
  FF_BankAccountTree *m_accountTree;
76

    
77
  const AE_BANKACCOUNT *m_presetBankAccount;
78
};
79

    
80

    
81
#endif
82

    
83