2006-10-28 19:45:02 +00:00
|
|
|
/*
|
|
|
|
* ShConstants.h
|
|
|
|
*
|
|
|
|
* This file is a part of NSIS.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2003 Ramon
|
|
|
|
*
|
|
|
|
* Licensed under the zlib/libpng license (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
*
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* This software is provided 'as-is', without any express or implied
|
|
|
|
* warranty.
|
2010-03-24 17:22:56 +00:00
|
|
|
*
|
|
|
|
* Unicode support by Jim Park -- 08/24/2007
|
2006-10-28 19:45:02 +00:00
|
|
|
*/
|
2003-12-22 14:02:15 +00:00
|
|
|
|
|
|
|
#ifndef ___CONSTANTS___H_____
|
|
|
|
#define ___CONSTANTS___H_____
|
|
|
|
|
2004-10-12 21:05:59 +00:00
|
|
|
#include "strlist.h"
|
2003-12-22 14:02:15 +00:00
|
|
|
|
|
|
|
struct constantstring {
|
|
|
|
int name;
|
|
|
|
int index;
|
|
|
|
int pos;
|
|
|
|
int value1;
|
|
|
|
int value2;
|
|
|
|
};
|
|
|
|
|
|
|
|
class ConstantsStringList : public SortedStringListND<struct constantstring>
|
|
|
|
{
|
|
|
|
public:
|
2004-10-12 21:05:59 +00:00
|
|
|
ConstantsStringList();
|
2003-12-22 14:02:15 +00:00
|
|
|
|
2010-03-24 17:22:56 +00:00
|
|
|
int add(const TCHAR *name, int value1, int value2);
|
|
|
|
int get(TCHAR *name, int n_chars = -1);
|
2004-10-12 21:05:59 +00:00
|
|
|
int getnum();
|
|
|
|
int get_value1(int idx);
|
|
|
|
int get_value2(int idx);
|
2010-03-24 17:22:56 +00:00
|
|
|
TCHAR *idx2name(int idx);
|
2003-12-22 14:02:15 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
int index;
|
2004-10-12 21:05:59 +00:00
|
|
|
int get_internal_idx(int idx);
|
2003-12-22 14:02:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|