2020-04-01 11:50:05 +00:00
|
|
|
#include <windows.h>
|
2020-02-25 15:11:25 +00:00
|
|
|
#include <string>
|
2020-04-01 11:50:05 +00:00
|
|
|
#include <tuple>
|
2020-02-25 15:11:25 +00:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class DatabaseWindow {
|
|
|
|
public:
|
|
|
|
DatabaseWindow(
|
|
|
|
HINSTANCE hInstance,
|
|
|
|
std::vector< std::pair< std::wstring, std::wstring > > &languages,
|
|
|
|
HWND parent_window );
|
|
|
|
|
|
|
|
void mainLoop();
|
|
|
|
static LRESULT CALLBACK messageHandler( HWND hwnd, UINT umsg, WPARAM wParam,
|
|
|
|
LPARAM lParam );
|
|
|
|
|
|
|
|
~DatabaseWindow() {
|
|
|
|
EnableWindow( parent, true );
|
|
|
|
SetFocus( parent );
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
void listNotify( LPARAM lParam );
|
|
|
|
void changed( int indes );
|
|
|
|
void save();
|
|
|
|
|
|
|
|
HWND window;
|
|
|
|
HWND lang_combo;
|
2020-04-01 11:50:05 +00:00
|
|
|
HWND list_hwnd{ nullptr };
|
|
|
|
HWND cancel_button{ nullptr };
|
|
|
|
HWND ok_button{ nullptr };
|
|
|
|
HWND save_button{ nullptr };
|
2020-02-25 15:11:25 +00:00
|
|
|
HWND parent;
|
|
|
|
HINSTANCE hInst;
|
|
|
|
int cur_row;
|
|
|
|
const int window_width{ 350 };
|
|
|
|
const int window_height{ 370 };
|
|
|
|
std::vector< int > changed_rows;
|
|
|
|
const std::vector< std::pair< std::wstring, std::wstring > > &langs;
|
2020-04-01 11:50:05 +00:00
|
|
|
std::vector< std::tuple< int, int, std::wstring > > show_ids;
|
2020-02-25 15:11:25 +00:00
|
|
|
static DatabaseWindow *dw;
|
|
|
|
};
|