Uporządkowanie komentarzy
This commit is contained in:
parent
b4d5743e54
commit
d422a94071
@ -82,20 +82,9 @@ RectangularButton(g_sPushReset, &g_sPushBtn, 0, 0,
|
|||||||
ClrDarkRed, ClrRed, ClrWhite, ClrWhite,
|
ClrDarkRed, ClrRed, ClrWhite, ClrWhite,
|
||||||
g_psFontCmss22b, "RESET", 0, 0, 0, 0, OnButtonReset);
|
g_psFontCmss22b, "RESET", 0, 0, 0, 0, OnButtonReset);
|
||||||
|
|
||||||
//*****************************************************************************
|
|
||||||
//*****************************************************************************
|
|
||||||
//
|
|
||||||
// A global we use to keep track of whether or not the "Hello" widget is
|
|
||||||
// currently visible.
|
|
||||||
//
|
|
||||||
//*****************************************************************************
|
|
||||||
bool g_bHelloVisible = false;
|
bool g_bHelloVisible = false;
|
||||||
|
|
||||||
//*****************************************************************************
|
|
||||||
//
|
|
||||||
// The error routine that is called if the driver library encounters an error.
|
|
||||||
//
|
|
||||||
//*****************************************************************************
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
void
|
void
|
||||||
__error__(char *pcFilename, uint32_t ui32Line)
|
__error__(char *pcFilename, uint32_t ui32Line)
|
||||||
@ -103,27 +92,6 @@ __error__(char *pcFilename, uint32_t ui32Line)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//*****************************************************************************
|
|
||||||
//
|
|
||||||
// This function is called by the graphics library widget manager in the
|
|
||||||
// context of WidgetMessageQueueProcess whenever the user releases the
|
|
||||||
// "Press Me!" button. We use this notification to display or hide the
|
|
||||||
// "Hello!" widget.
|
|
||||||
//
|
|
||||||
// This is actually a rather inefficient way to accomplish this but it's
|
|
||||||
// a good example of how to add and remove widgets dynamically. In
|
|
||||||
// normal circumstances, you would likely leave the g_sHello widget
|
|
||||||
// linked into the tree and merely add or remove the text by changing
|
|
||||||
// its style then repainting.
|
|
||||||
//
|
|
||||||
// If using this dynamic add/remove strategy, another useful optimization
|
|
||||||
// is to use a black canvas widget that covers the same area of the screen
|
|
||||||
// as the widgets that you will be adding and removing. If this is the used
|
|
||||||
// as the point in the tree where the subtree is added or removed, you can
|
|
||||||
// repaint just the desired area by repainting the black canvas rather than
|
|
||||||
// repainting the whole tree.
|
|
||||||
//
|
|
||||||
//*****************************************************************************
|
|
||||||
void OnButtonPress(tWidget *psWidget) // funkcja obslugujaca przycisk start
|
void OnButtonPress(tWidget *psWidget) // funkcja obslugujaca przycisk start
|
||||||
{
|
{
|
||||||
g_bHelloVisible = !g_bHelloVisible;
|
g_bHelloVisible = !g_bHelloVisible;
|
||||||
|
Loading…
Reference in New Issue
Block a user