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
|
/** \file mswstatus.c
* Status bar
*/
/* XTrkCad - Model Railroad CAD
* Copyright (C) 2005 Dave Bullis,
* 2017 Martin Fischer <m_fischer@sf.net>
*
* 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.
*
*
*/
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#include "mswint.h"
/**
* Set the message text
*
* \param b IN widget
* \param arg IN new text
* \return
*/
void wStatusSetValue(
wStatus_p b,
const char * arg)
{
wMessageSetValue((wMessage_p)b, arg);
}
/**
* Create a window for a simple text.
*
* \param IN parent Handle of parent window
* \param IN x position in x direction
* \param IN y position in y direction
* \param IN labelStr ???
* \param IN width horizontal size of window
* \param IN message message to display ( null terminated )
* \param IN flags display options
* \return handle for created window
*/
wStatus_p wStatusCreate(
wWin_p parent,
wWinPix_t x,
wWinPix_t y,
const char * labelStr,
wWinPix_t width,
const char *message)
{
return (wStatus_p)wMessageCreateEx(parent, x, y, labelStr, width, message, 0);
}
/**
* Get the anticipated length of a message field
*
* \param testString IN string that should fit into the message box
* \return expected width of message box
*/
wWinPix_t
wStatusGetWidth(const char *testString)
{
return (wMessageGetWidth(testString));
}
/**
* Get height of message text
*
* \param flags IN text properties (large or small size)
* \return text height
*/
wWinPix_t wStatusGetHeight(
long flags)
{
return (wMessageGetHeight(flags));
}
/**
* Set the width of the widget
*
* \param b IN widget
* \param width IN new width
* \return
*/
void wStatusSetWidth(
wStatus_p b,
wWinPix_t width)
{
wMessageSetWidth((wMessage_p)b, width);
}
|