1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
|
/**
@license GNU GPLv2
PROJECT "codfis"
Copyright 2005,2006 Danilo Cicerone
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
@file calccf.h
@author Danilo Cicerone info@digitazero.org
@date 2006-05-11
@version 0.4.7
*/
#ifndef CALCCF_H
#define CALCCF_H
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Input.H>
#include <FL/Fl_Output.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Choice.H>
#include <FL/Fl_Menu_Item.H>
#include <FL/fl_ask.H>
#if defined(WIN32)
// Nothing to do here (Dev-C++ solve this problem)
#elif defined(__APPLE__)
// Nothing to do here
#else
#include <FL/x.H>
#include <X11/xpm.h>
#include "codfis.xpm"
#endif
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sqlite3.h>
#include "dlg_db_ch.h"
#include "dlg_info.h"
#include "struty.h"
using namespace std;
class CFWin {
public:
CFWin();
~CFWin();
void show();
void hide();
int visible();
Fl_Window *win_main;
Fl_Box *lbl_inte;
Fl_Input *txt_cogn;
Fl_Input *txt_nome;
Fl_Choice *cbo_sess;
Fl_Input *txt_data;
Fl_Box *lbl_data;
Fl_Output *lbl_luna;
Fl_Output *lbl_outc;
Fl_Button *btn_selc;
Fl_Button *btn_calc;
Fl_Button *btn_newc;
Fl_Button *btn_esci;
Fl_Button *btn_info;
private:
static Fl_Menu_Item sex[];
int gg;
int mm;
int aa;
string codcat;
inline void
cb_win_main_i();
static void
cb_win_main(Fl_Window*, void*);
inline void
cb_txt_cogn_i();
static void
cb_txt_cogn(Fl_Input*, void*);
inline void
cb_txt_nome_i();
static void
cb_txt_nome(Fl_Input*, void*);
inline void
cb_cbo_sess_i();
static void
cb_cbo_sess(Fl_Input*, void*);
inline void
cb_txt_data_i();
static void
cb_txt_data(Fl_Input*, void*);
inline void
cb_lbl_luna_i();
static void
cb_lbl_luna(Fl_Output*, void*);
static void
cb_lbl_outc(Fl_Output*, void*);
inline void
cb_btn_selc_i();
static void
cb_btn_selc(Fl_Button*, void*);
inline void
cb_btn_calc_i();
static void
cb_btn_calc(Fl_Button*, void*);
inline void
cb_btn_newc_i();
static void
cb_btn_newc(Fl_Button*, void*);
static void
cb_btn_esci(Fl_Button*, void*);
static void
cb_btn_info(Fl_Button*, void*);
inline void
show_info();
int
check_data();
void
calcodfis();
string
trovacons(const string& input, const bool isnome);
};
#endif
|