/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#+
#+     Internet Radio Automation & Encoding Toolkit
#+
#+     Copyright (C) 2018 - 2026 by Kevin C. O'Kane
#+
#+     Kevin C. O'Kane
#+     kc.okane@gmail.com
#+     https://www.cs.uni.edu/~okane
#+     https://threadsafebooks.com/
#+
#+ 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#+
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

//	June 14, 2026

#include "includes.h"
#include "common-externs.h"


#define SLASH '/'

//--------------- UP/DOWN BUTTON PRESS EVENT program rows

//-----------------------------------------------------------------------------------------------
//      on_up1_button_press_event on_up2_button_press_event on_up3_button_press_event
//      on_up4_button_press_event on_up5_button_press_event on_up6_button_press_event
//      on_up7_button_press_event on_up8_button_press_event on_up9_button_press_event
//      on_up10_button_press_event on_up11_button_press_event on_up12_button_press_event
//-----------------------------------------------------------------------------------------------

#define UP_PRESS_EVENT(NBR) \
        gboolean on_up## NBR ##_button_press_event \
                (GtkButton *btn, GdkEventButton *event, gpointer user_data) { \
                if (event->button == 1 ) return FALSE; \
                moveToBottom(SP->begin + NBR - 1 ); \
                DisplayProgramButtons(); \
                return TRUE; \
                }

UP_PRESS_EVENT(1) UP_PRESS_EVENT(2)  UP_PRESS_EVENT(3)  UP_PRESS_EVENT(4)
UP_PRESS_EVENT(5) UP_PRESS_EVENT(6)  UP_PRESS_EVENT(7)  UP_PRESS_EVENT(8)
UP_PRESS_EVENT(9) UP_PRESS_EVENT(10) UP_PRESS_EVENT(11) UP_PRESS_EVENT(12)

//--------------- UP/DOWN CLICK signal program rows

//-----------------------------------------------------------------------------------------------
//      on_up1_clicked on_up2_clicked on_up3_clicked
//      on_up4_clicked on_up5_clicked on_up6_clicked
//      on_up7_clicked on_up8_clicked on_up9_clicked
//      on_up10_clicked on_up11_clicked on_up12_clicked
//-----------------------------------------------------------------------------------------------

#define UP_CLICKED(NBR) \
void    on_up## NBR ##_clicked (GtkButton *btn) { moveToTop(SP->begin + NBR - 1 ); \
                DisplayProgramButtons(); }

UP_CLICKED(1) UP_CLICKED(2)  UP_CLICKED(3)  UP_CLICKED(4)
UP_CLICKED(5) UP_CLICKED(6)  UP_CLICKED(7)  UP_CLICKED(8)
UP_CLICKED(9) UP_CLICKED(10) UP_CLICKED(11) UP_CLICKED(12)

